Log server exceptions to stdout
This commit is contained in:
parent
f0af1c7201
commit
5ef5280ef9
1 changed files with 2 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import sys
|
||||||
import json
|
import json
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import time
|
import time
|
||||||
|
@ -241,7 +242,7 @@ class RouteErrorHandler(APIRoute):
|
||||||
] = None,
|
] = None,
|
||||||
) -> 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)
|
||||||
if body is not None and isinstance(
|
if body is not None and isinstance(
|
||||||
body,
|
body,
|
||||||
(
|
(
|
||||||
|
|
Loading…
Reference in a new issue