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 sys
|
||||||
import json
|
import json
|
||||||
|
import traceback
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import time
|
import time
|
||||||
from re import compile, Match, Pattern
|
from re import compile, Match, Pattern
|
||||||
|
@ -243,6 +244,7 @@ class RouteErrorHandler(APIRoute):
|
||||||
) -> Tuple[int, ErrorResponse]:
|
) -> Tuple[int, ErrorResponse]:
|
||||||
"""Wraps error message in OpenAI style error response"""
|
"""Wraps error message in OpenAI style error response"""
|
||||||
print(f"Exception: {str(error)}", file=sys.stderr)
|
print(f"Exception: {str(error)}", file=sys.stderr)
|
||||||
|
traceback.print_exc(file=sys.stderr)
|
||||||
if body is not None and isinstance(
|
if body is not None and isinstance(
|
||||||
body,
|
body,
|
||||||
(
|
(
|
||||||
|
|
Loading…
Reference in a new issue