Skip to content

ChromaDB.Client.ChromaException: Unexpected status code: NotFound #83

Closed

Description

@Chris-Maina

I have ChromaDB.Client version 1.0.0. and chromadb/chroma:1.0.16.dev95 running locally in Docker. Below is how I create a client, check server health and get/create a collection. The server health is okay. Verified by calling the Heartbeat method/endpoint but GetOrCreateCollection always fails with the exception ChromaDB.Client.ChromaException: Unexpected status code: NotFound

Ps note I have also tried using chromadb/chroma:0.6.4.dev226 with no success.

    using var httpClient = new HttpClient();
    var configOptions = new ChromaConfigurationOptions(uri: ChromaDbUri);
    var client = new ChromaClient(configOptions, httpClient);
    try
    {
           // 1. Check server health. Succeeds
           await client.Heartbeat();
           // 2. Get or Create collection. Fails always
           var collection = await client.GetOrCreateCollection(TestCollectionName);
    }
    catch (ChromaException ex) when(ex.InnerException?.Message.Contains("NotFound") == true){}
    catch (ChromaException ex) when (ex.InnerException?.Message.Contains("MethodNotAllowed") == true){}
    catch (Exception ex) 
     {
         // Catches the ChromaException: Unexpected status code: NotFound
     }

Any idea of how to fix this?

Activity

  1. Chris-Maina commented on Oct 18, 2025

    @Chris-Maina
    Author

    Rookie mistake. Missed ending / when supplying the chromaDB uri.

  2. Laurianti commented on Oct 3, 2026

    @Laurianti

    ChromaDotNet.Client also accepts the URI without the trailing slash, or with just the address of the server (#84).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions