Skip to main content

malformed-body

HTTP status: 400 Bad Request Type URI: https://docs.evinor.ai/problems/malformed-body

The request body could not be parsed as JSON, so there was nothing to validate yet. Unlike validation-failed, this problem carries no errors array — the failure is in the encoding, not in any field.

{
"type": "https://docs.evinor.ai/problems/malformed-body",
"title": "Malformed body",
"status": 400,
"retryable": false,
"detail": "The request body is not valid JSON.",
"request_id": "…"
}

Common causes​

  • A truncated or hand-built JSON string (a missing brace, a trailing comma).
  • A body sent with Content-Type: application/json that is not JSON at all.
  • Single-quoted strings or unquoted keys, which JSON does not allow.

How to resolve​

Serialize the body with a JSON library rather than by string concatenation, and resend. An identical resend is refused identically, so do not retry the same bytes. Nothing was executed or charged, so you may reuse the same Idempotency-Key once the body is fixed.