Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix(proxy): raise (not return) proxy exception in get/delete credential endpoints

eeshsaxenae36e3d4a6f5b
diff --git a/litellm/proxy/credential_endpoints/endpoints.py b/litellm/proxy/credential_endpoints/endpoints.py
index 3b3e9692eda..106b43a722c 100644
--- a/litellm/proxy/credential_endpoints/endpoints.py
+++ b/litellm/proxy/credential_endpoints/endpoints.py
@@ -130,7 +130,7 @@ async def get_credentials(
]
return {"success": True, "credentials": masked_credentials}
except Exception as e:
- return handle_exception_on_proxy(e)
+ raise handle_exception_on_proxy(e)
@router.get(
@@ -240,7 +240,7 @@ async def delete_credential(
litellm.credential_list = [cred for cred in litellm.credential_list if cred.credential_name != credential_name]
return {"success": True, "message": "Credential deleted successfully"}
except Exception as e:
- return handle_exception_on_proxy(e)
+ raise handle_exception_on_proxy(e)
def update_db_credential(