fix: no stacktrace for validartion errors
This commit is contained in:
parent
5b8c5d52da
commit
78f94483d0
1 changed files with 0 additions and 2 deletions
|
|
@ -194,8 +194,6 @@ def register_exception_handlers(app: FastAPI):
|
||||||
async def validation_exception_handler(
|
async def validation_exception_handler(
|
||||||
request: Request, exc: RequestValidationError
|
request: Request, exc: RequestValidationError
|
||||||
):
|
):
|
||||||
etype, _, tb = sys.exc_info()
|
|
||||||
traceback.print_exception(etype, exc, tb)
|
|
||||||
logger.error(f"RequestValidationError: {str(exc)}")
|
logger.error(f"RequestValidationError: {str(exc)}")
|
||||||
# Only the browser sends "text/html" request
|
# Only the browser sends "text/html" request
|
||||||
# not fail proof, but everything else get's a JSON response
|
# not fail proof, but everything else get's a JSON response
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue