mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
(fix) proxy server - print error msg on exceptions
This commit is contained in:
parent
6c4f8358bd
commit
654e31af1c
1 changed files with 1 additions and 0 deletions
|
@ -504,6 +504,7 @@ async def completion(request: Request, model: Optional[str] = None):
|
|||
print(f"\033[1;31mAn error occurred: {e}\n\n Debug this by setting `--debug`, e.g. `litellm --model gpt-3.5-turbo --debug`")
|
||||
error_traceback = traceback.format_exc()
|
||||
error_msg = f"{str(e)}\n\n{error_traceback}"
|
||||
print(error_msg)
|
||||
return {"error": error_msg}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue