mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 18:24:20 +00:00
(fix) proxy server - raise 500 on exceptions
This commit is contained in:
parent
6ddefc778a
commit
6898840218
1 changed files with 2 additions and 2 deletions
|
@ -493,7 +493,7 @@ async def completion(request: Request, model: Optional[str] = None):
|
|||
try:
|
||||
status = e.status_code # type: ignore
|
||||
except:
|
||||
status = status.HTTP_500_INTERNAL_SERVER_ERROR,
|
||||
status = 500
|
||||
raise HTTPException(
|
||||
status_code=status,
|
||||
detail=error_msg
|
||||
|
@ -529,7 +529,7 @@ async def chat_completion(request: Request, model: Optional[str] = None):
|
|||
try:
|
||||
status = e.status_code # type: ignore
|
||||
except:
|
||||
status = status.HTTP_500_INTERNAL_SERVER_ERROR,
|
||||
status = 500
|
||||
raise HTTPException(
|
||||
status_code=status,
|
||||
detail=error_msg
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue