Skip to main content

quota_exceeded_response

Function quota_exceeded_response 

Source
fn quota_exceeded_response(
    accounting: &BodyMemoryAccounting,
    response: Response,
) -> Response
Expand description

Rewrites the response of a request whose body accounting hit the quota: the failure aborts the body mid-stream, so the extractors reject the request with a generic body error (mapped to 400). Quota exhaustion must surface as 429, matching the upfront admission path, so clients can tell backpressure apart from malformed input.