chroma-core/chroma · error · ChromaAuthError

Database does not match from the server. Are you sure the…

Error message

Database {user_provided_database} does not match {new_database} from the server. Are you sure the database is correct?

What it means

ChromaError raised in maybe_set_tenant_and_database when the database explicitly provided by the user (non-default) differs from the database resolved from the authenticated user identity. Like the tenant check, it fires mainly when overwrite_singleton_tenant_database_access_from_auth=True is misconfigured without an auth provider.

Solutions

  1. Omit the database argument and let the server resolve it from auth
  2. Use the database name associated with the authenticated identity
  3. Disable overwrite_singleton_tenant_database_access_from_auth unless an auth provider is configured
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at chromadb/auth/utils/__init__.py:75 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16). Data as JSON: /api/errors/94ebd1fd7a7c3406. Report an issue: GitHub.

Appendix: source

Thrown at chromadb/auth/utils/__init__.py:75

    # don't match what we resolved from auth. This can incorrectly happen when
    # there is no auth provider set, but overwrite_singleton_tenant_database_access_from_auth
    # is set to True. In this case, we'll resolve tenant/database to the default
    # values, which might not match the provided values. Thus, it's important
    # to ensure that the flag is set to True only when there is an auth provider.
    if (
        user_provided_tenant
        and user_provided_tenant != DEFAULT_TENANT
        and new_tenant
        and new_tenant != user_provided_tenant
    ):
        raise ChromaAuthError(f"Tenant {user_provided_tenant} does not match {new_tenant} from the server. Are you sure the tenant is correct?")
    if (
        user_provided_database
        and user_provided_database != DEFAULT_DATABASE
        and new_database
        and new_database != user_provided_database
    ):
        raise ChromaAuthError(f"Database {user_provided_database} does not match {new_database} from the server. Are you sure the database is correct?")

    if (
        not user_provided_tenant or user_provided_tenant == DEFAULT_TENANT
    ) and new_tenant:
        user_provided_tenant = new_tenant
    if (
        not user_provided_database or user_provided_database == DEFAULT_DATABASE
    ) and new_database:
        user_provided_database = new_database

    return user_provided_tenant, user_provided_database

View on GitHub (pinned to aecdd12c8a)