Merge pull request #3688 from leobenkel/no-trace-when-success

fix: Remove the tracestack when the collection already exists
This commit is contained in:
Timothy Jaeryang Baek 2024-07-07 09:00:23 -07:00 committed by GitHub
commit 7e6c5193d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1004,10 +1004,11 @@ def store_docs_in_vector_db(docs, collection_name, overwrite: bool = False) -> b
return True
except Exception as e:
log.exception(e)
if e.__class__.__name__ == "UniqueConstraintError":
return True
log.exception(e)
return False