mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
(fix) improve unauthorized error message
This commit is contained in:
parent
c15adf4fe4
commit
e16fa16442
1 changed files with 2 additions and 2 deletions
|
@ -358,7 +358,7 @@ async def user_api_key_auth(
|
|||
)
|
||||
return UserAPIKeyAuth(api_key=api_key, **valid_token_dict)
|
||||
else:
|
||||
raise Exception(f"Invalid token")
|
||||
raise Exception(f"Invalid Key Passed to LiteLLM Proxy")
|
||||
except Exception as e:
|
||||
# verbose_proxy_logger.debug(f"An exception occurred - {traceback.format_exc()}")
|
||||
traceback.print_exc()
|
||||
|
@ -367,7 +367,7 @@ async def user_api_key_auth(
|
|||
else:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||
detail=f"Invalid user key, {str(e)}",
|
||||
detail=f"Authentication Error, {str(e)}",
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue