Documentation

Request body too large

The request body exceeds the generated server's configured byte limit. The default max_body_bytes is 2,097,152 bytes (2 MiB).

Last reviewed October 27, 2026

Problem identity

HTTP status: 413. Stable code: request_body_too_large.

Type URI: https://openapi-to-rust.dev/problems/request-body-too-large.

How to respond

Send a smaller body. Service owners can adjust server.validation.max_body_bytes within the supported range of 1 through 67,108,864 bytes.

Example response

The response uses application/problem+json. This is an illustrative body; individual violations depend on the request.

Response body json
{
  "type": "https://openapi-to-rust.dev/problems/request-body-too-large",
  "title": "Request body too large",
  "status": 413,
  "code": "request_body_too_large"
}

Error fields

type identifies the problem category, title summarizes it, status mirrors the HTTP status, and code is a stable machine-readable label. The optional errors array contains sanitized code, location, and message fields. Empty arrays are omitted.

Locations are JSON Pointers rooted at /body, /path, /query, /header, or /cookie. Violations are deduplicated, capped (16 by default), then sorted. Messages omit submitted values and internal diagnostics.

Clients can use the type URI as an identifier without fetching this page for every error. See RFC 9457, section 3.1.1.

Related documentation