mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 04:16:03 -05:00
[PR #11955] [MERGED] fix: Improve error handling in ChromaDB delete function for non-existent collections #38456
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/11955
Author: @jfbloom22
Created: 3/22/2025
Status: ✅ Merged
Merged: 3/22/2025
Merged by: @tjbck
Base:
dev← Head:dev📝 Commits (1)
bdd236fimproved error handling for deleting collections that do not exist in chromadb📊 Changes
1 file changed (+11 additions, -6 deletions)
View changed files
📝
backend/open_webui/retrieval/vector/dbs/chroma.py(+11 -6)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.No updates needed.
Changelog Entry
Description
This PR improves error handling in the ChromaDB delete function to gracefully handle attempts to delete from non-existent collections. Previously, attempting to delete from a collection that doesn't exist would raise an exception, potentially disrupting application flow. Now, such attempts simply log a debug message and continue execution.
This addresses an issue described in this discussion, where users were experiencing exceptions when trying to delete from a collection that doesn't exist.
Added
Changed
Fixed
Additional Information
This improvement makes the ChromaDB client more resilient by preventing exceptions when deleting from collections that don't exist. This is particularly useful in cleanup operations where the code may attempt to delete collections regardless of their existence status.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.