BerriAI/litellm · error · Exception
Error deleting search tool from DB: {e}
Error message
Error deleting search tool from DB: {e} What it means
Catch-all from the search tool registry delete routine: the Prisma delete on the SearchTools table (after the existence check passed) raised; the original database error text is embedded in the message.
Source
Thrown at litellm/proxy/search_endpoints/search_tool_registry.py:114
try:
# Get search tool before deletion for response
existing_tool: Final = await SearchToolsRepository(prisma_client).table.find_unique(
where={"search_tool_id": search_tool_id}
)
if not existing_tool:
raise Exception(f"Search tool with ID {search_tool_id} not found")
# Delete from DB
await SearchToolsRepository(prisma_client).table.delete(where={"search_tool_id": search_tool_id})
return {
"message": f"Search tool {search_tool_id} deleted successfully",
"search_tool_name": existing_tool.search_tool_name,
}
except Exception as e:
verbose_proxy_logger.exception("Error deleting search tool from DB: %s", e)
raise Exception(f"Error deleting search tool from DB: {e}")
async def update_search_tool_in_db(self, search_tool_id: str, search_tool: SearchTool, prisma_client: PrismaClient):
"""
Update a search tool in the database.
Args:
search_tool_id: ID of search tool to update
search_tool: Updated search tool configuration
prisma_client: Prisma client instance
Returns:
Dict with updated search tool data
"""
try:
search_tool_name: Final = search_tool.get("search_tool_name")
litellm_params: Final[str] = safe_dumps(dict(search_tool.get("litellm_params", {})))
search_tool_info: Final[str] = safe_dumps(search_tool.get("search_tool_info", {}))
View on GitHub (pinned to 77b7c6c40c)
Solutions
- Check DB connectivity and logs; retry the delete once the DB error is resolved.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at litellm/proxy/search_endpoints/search_tool_registry.py:114 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/8687e92d8c6e6213.
Report an issue: GitHub.