Skip to main content

json_rejection_response

Function json_rejection_response 

Source
pub fn json_rejection_response(error: JsonRejection) -> Response
Expand description

Render a JSON body extraction failure as a response.

413 Payload Too Large when the body exceeded the configured limit, 400 Bad Request for every other rejection (missing/invalid content type, malformed JSON, etc.).