Print traceback on server error
This commit is contained in:
parent
43dfe1e2ab
commit
d6a130a052
1 changed files with 2 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
import sys
|
||||
import json
|
||||
import traceback
|
||||
import multiprocessing
|
||||
import time
|
||||
from re import compile, Match, Pattern
|
||||
|
@ -243,6 +244,7 @@ class RouteErrorHandler(APIRoute):
|
|||
) -> Tuple[int, ErrorResponse]:
|
||||
"""Wraps error message in OpenAI style error response"""
|
||||
print(f"Exception: {str(error)}", file=sys.stderr)
|
||||
traceback.print_exc(file=sys.stderr)
|
||||
if body is not None and isinstance(
|
||||
body,
|
||||
(
|
||||
|
|
Loading…
Reference in a new issue