Browse Source

linter

pull/14400/head
Javier Sánchez 7 months ago
parent
commit
5302f988cf
  1. 5
      fastapi/routing.py

5
fastapi/routing.py

@ -351,7 +351,7 @@ def get_request_handler(
else: else:
body = body_bytes body = body_bytes
except json.JSONDecodeError as e: except json.JSONDecodeError as e:
validation_error = RequestMalformedError( raise RequestMalformedError(
[ [
{ {
"type": "json_invalid", "type": "json_invalid",
@ -362,8 +362,7 @@ def get_request_handler(
} }
], ],
body=e.doc, body=e.doc,
) ) from e
raise validation_error from e
except HTTPException: except HTTPException:
# If a middleware raises an HTTPException, it should be raised again # If a middleware raises an HTTPException, it should be raised again
raise raise

Loading…
Cancel
Save