Skip to content

Commit 0d8eebd

Browse files
committed
Fix logging of ChromaDB collection creation
Auto-cherry-pick to 1.0.x Fixes #3542 Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
1 parent d9a5337 commit 0d8eebd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

vector-stores/spring-ai-chroma-store/src/main/java/org/springframework/ai/chroma/vectorstore/ChromaVectorStore.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ public void afterPropertiesSet() throws Exception {
135135
new ChromaApi.CreateCollectionRequest(this.collectionName));
136136
}
137137
else {
138-
throw new RuntimeException("Collection " + this.collectionName
138+
throw new RuntimeException("Collection " + this.collectionName + " with the tenant: "
139+
+ this.tenantName + " and the database: " + this.databaseName
139140
+ " doesn't exist and won't be created as the initializeSchema is set to false.");
140141
}
141142
}

vector-stores/spring-ai-chroma-store/src/test/java/org/springframework/ai/chroma/vectorstore/ChromaApiIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ void shouldFailWhenCollectionDoesNotExist() {
274274
.hasMessage("Failed to initialize ChromaVectorStore")
275275
.hasCauseInstanceOf(RuntimeException.class)
276276
.hasRootCauseMessage(
277-
"Collection non-existent doesn't exist and won't be created as the initializeSchema is set to false.");
277+
"Collection non-existent with the tenant: SpringAiTenant and the database: SpringAiDatabase doesn't exist and won't be created as the initializeSchema is set to false.");
278278
}
279279

280280
@Test

0 commit comments

Comments
 (0)