From b75bd361c378d8e7700aa6b3f6642cb4678fb380 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Tue, 10 Mar 2026 20:39:30 -0700 Subject: [PATCH] fix(mcp): narrow bare except to RecordNotFoundError in BYOK credential delete --- litellm/proxy/management_endpoints/mcp_management_endpoints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/management_endpoints/mcp_management_endpoints.py b/litellm/proxy/management_endpoints/mcp_management_endpoints.py index bcc69b34775..9abd8e2f306 100644 --- a/litellm/proxy/management_endpoints/mcp_management_endpoints.py +++ b/litellm/proxy/management_endpoints/mcp_management_endpoints.py @@ -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,