{"record":{"id":"94ebd1fd7a7c3406","repo":"chroma-core/chroma","slug":"database-user-provided-database-does-not-match","errorCode":null,"errorMessage":"Database {user_provided_database} does not match {new_database} from the server. Are you sure the database is correct?","messagePattern":"Database (.+?) does not match (.+?) from the server\\. Are you sure the database is correct\\?","errorType":"http","errorClass":"ChromaAuthError","httpStatus":403,"severity":"error","filePath":"chromadb/auth/utils/__init__.py","lineNumber":75,"sourceCode":"    # don't match what we resolved from auth. This can incorrectly happen when\n    # there is no auth provider set, but overwrite_singleton_tenant_database_access_from_auth\n    # is set to True. In this case, we'll resolve tenant/database to the default\n    # values, which might not match the provided values. Thus, it's important\n    # to ensure that the flag is set to True only when there is an auth provider.\n    if (\n        user_provided_tenant\n        and user_provided_tenant != DEFAULT_TENANT\n        and new_tenant\n        and new_tenant != user_provided_tenant\n    ):\n        raise ChromaAuthError(f\"Tenant {user_provided_tenant} does not match {new_tenant} from the server. Are you sure the tenant is correct?\")\n    if (\n        user_provided_database\n        and user_provided_database != DEFAULT_DATABASE\n        and new_database\n        and new_database != user_provided_database\n    ):\n        raise ChromaAuthError(f\"Database {user_provided_database} does not match {new_database} from the server. Are you sure the database is correct?\")\n\n    if (\n        not user_provided_tenant or user_provided_tenant == DEFAULT_TENANT\n    ) and new_tenant:\n        user_provided_tenant = new_tenant\n    if (\n        not user_provided_database or user_provided_database == DEFAULT_DATABASE\n    ) and new_database:\n        user_provided_database = new_database\n\n    return user_provided_tenant, user_provided_database\n","sourceCodeStart":57,"sourceCodeEnd":87,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/auth/utils/__init__.py#L57-L87","documentation":"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.","triggerScenarios":"Thrown at chromadb/auth/utils/__init__.py:75 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Omit the database argument and let the server resolve it from auth","Use the database name associated with the authenticated identity","Disable overwrite_singleton_tenant_database_access_from_auth unless an auth provider is configured"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","contentChangedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}