diff --git a/impl/main.py b/impl/main.py index fff544c..d8e626d 100644 --- a/impl/main.py +++ b/impl/main.py @@ -233,7 +233,7 @@ async def shutdown_event(): @app.exception_handler(Exception) async def generic_exception_handler(request: Request, exc: Exception): # Log the error - logger.error(f"Unexpected error: {exc} for request url {request.url} request method {request.method} request path params {request.path_params} request query params {request.query_params} request body {await request.body()} base_url {request.base_url}") + logger.error(f"Unexpected error: {exc} for request url {request.url} request method {request.method} request path params {request.path_params} request query params {request.query_params} base_url {request.base_url}") if isinstance(exc, HTTPException): raise exec @@ -247,7 +247,7 @@ async def generic_exception_handler(request: Request, exc: Exception): async def validation_exception_handler(request: Request, exc: RequestValidationError): logging.error(f"Validation error for request: {request.url}") logging.error(f"Body: {exc.body}") - logger.error(f"Validation error: {exc} for request url {request.url} request method {request.method} request path params {request.path_params} request query params {request.query_params} request body {await request.body()} base_url {request.base_url}") + logger.error(f"Validation error: {exc} for request url {request.url} request method {request.method} request path params {request.path_params} request query params {request.query_params} base_url {request.base_url}") logging.error(f"Errors: {exc.errors()}") return JSONResponse( status_code=422,