mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
Update litellm/proxy/management_endpoints/jwt_key_mapping_endpoints.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
63459d6777
commit
36e63bd1ee
1 changed files with 5 additions and 0 deletions
|
|
@ -142,6 +142,11 @@ async def update_jwt_key_mapping(
|
|||
status_code=409,
|
||||
detail="A mapping with those claim values already exists.",
|
||||
)
|
||||
if "foreign" in error_str or "p2003" in error_str:
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
detail="The provided key does not match an existing virtual key.",
|
||||
)
|
||||
raise HTTPException(status_code=500, detail="Failed to update JWT key mapping.")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue