Documentation

Malformed request

The request body could not be read or decoded. Examples include invalid JSON syntax and malformed form encoding.

Last reviewed October 27, 2026

Problem identity

HTTP status: 400. Stable code: malformed_request.

Type URI: https://openapi-to-rust.dev/problems/malformed-request.

How to respond

Check the body syntax and encoding against the operation's declared request media type, then send a corrected request.

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/malformed-request",
  "title": "Malformed request",
  "status": 400,
  "code": "malformed_request"
}

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