Browse Source

Improve logging for custom exceptions in routing

pull/12490/head
Rushan 6 months ago
committed by GitHub
parent
commit
0507c3602c
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      fastapi/routing.py

2
fastapi/routing.py

@ -283,7 +283,7 @@ def get_request_handler(
raise
except Exception as e:
http_error = HTTPException(
status_code=400, detail="There was an error parsing the body"
status_code=400, detail=f"There was an error parsing the body: {e}"
)
raise http_error from e
errors: List[Any] = []

Loading…
Cancel
Save