fix(mcp): narrow bare except to RecordNotFoundError in BYOK credential delete

This commit is contained in:
Ishaan Jaffer 2026-03-10 20:39:30 -07:00
parent 4626862580
commit b75bd361c3

View file

@ -1386,7 +1386,7 @@ if MCP_AVAILABLE:
)
try:
await delete_user_credential(prisma_client, user_id, server_id)
except Exception:
except RecordNotFoundError:
pass # Already deleted or didn't exist
from litellm.proxy._experimental.mcp_server.server import (
_invalidate_byok_cred_cache,