{"record":{"id":"e61bc4f2fc2219ce","repo":"chroma-core/chroma","slug":"if-name-is-specified-tenant-and-database-must-als","errorCode":null,"errorMessage":"If name is specified, tenant and database must also be specified in order to uniquely identify the collection","messagePattern":"If name is specified, tenant and database must also be specified in order to uniquely identify the collection","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"chromadb/db/mixins/sysdb.py","lineNumber":468,"sourceCode":"                )\n\n            return segments\n\n    @trace_method(\"SqlSysDB.get_collections\", OpenTelemetryGranularity.ALL)\n    @override\n    def get_collections(\n        self,\n        id: Optional[UUID] = None,\n        name: Optional[str] = None,\n        tenant: str = DEFAULT_TENANT,\n        database: str = DEFAULT_DATABASE,\n        limit: Optional[int] = None,\n        offset: Optional[int] = None,\n    ) -> Sequence[Collection]:\n        \"\"\"Get collections by name, embedding function and/or metadata\"\"\"\n\n        if name is not None and (tenant is None or database is None):\n            raise ValueError(\n                \"If name is specified, tenant and database must also be specified in order to uniquely identify the collection\"\n            )\n\n        add_attributes_to_current_span(\n            {\n                \"collection_id\": str(id),\n                \"collection_name\": name if name else \"\",\n            }\n        )\n\n        collections_t = Table(\"collections\")\n        metadata_t = Table(\"collection_metadata\")\n        databases_t = Table(\"databases\")\n        q = (\n            self.querybuilder()\n            .from_(collections_t)\n            .select(\n                collections_t.id,","sourceCodeStart":450,"sourceCodeEnd":486,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/db/mixins/sysdb.py#L450-L486","documentation":"Error \"If name is specified, tenant and database must also be specified in order to uniquely identify the collection\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at chromadb/db/mixins/sysdb.py:468 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}