Skip to content

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

@mipo256

Description

@mipo256

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions