spring-ai icon indicating copy to clipboard operation
spring-ai copied to clipboard

The exception handling in ChromaAPI when working with collections seems to be incorrect

Open mipo256 opened this issue 1 week ago • 1 comments
trafficstars

Problem:

Method ChromaApi#getCollection throws a RuntimeException with the message : "Collection [%s] does not exist" (note the correct spelling of "exist"). This seems to be not what the framework expects - the exception is expected to be catched and then processed. For instance, in the ChromaVectorStore this is certainly not an expected behavior.

What needs to be fixed:

The ChromaApi#getCollection should return null as it was, I guess, supposed to do if the chromadb collection does not exist.

Chroma version: v1.3.4

I have created a MRE repo on hte GitHub: https://github.com/mipo256/spring-ai-autopilot-podlodka. The pre-requisite is to have the docker container for chroma running (from docker compose for example).

mipo256 avatar Nov 11 '25 06:11 mipo256