request.malformed
The request body cannot be parsed
| Type | https://mthds.ai/errors/request.malformed |
| Family | request: The HTTP request itself, before any run. |
| Domain | input: the caller acts, by changing the request or its inputs |
| Retry | no: repeating the operation fails the same way |
| HTTP status | 422 |
| Raised as | a problem document, sent as the body of an HTTP response or kept in a run's record |
What it means
The body is not parseable JSON, a Base64 or zip payload it carries is corrupt, or a text entry holds a code point UTF-8 cannot encode. The protocol answers a malformed body with a 422.
What to do
Check how the client builds the body: that it serializes valid JSON, writes text in UTF-8, and encodes every Base64 entry in standard padded Base64 with its pad bits zero. Then send the request again.
Next steps
A problem carries the step aimed at whoever reads it: the first when its reader is the domain's actor, the caller, and the second for any other reader.
| Reader | Kind | Detail |
|---|---|---|
| The domain's actor | change_input |
Fix the body so that it parses, then send the request again. |
| Any other reader | change_input |
Pass this to the caller, who must send a request body that parses. |
Detail
The problem's detail is written from this template, filled with the occurrence's parameters:
The runner cannot parse the request body (reason:
{reason}).
Parameters
Every parameter is present on every occurrence of the code.
| Name | Type | Description |
|---|---|---|
reason |
one of not_json, not_utf8, bad_base64, bad_zip |
What could not be parsed: the body as JSON, a text entry as UTF-8, a Base64 entry, or a zip archive the request carries. |
See also
- Method files
- Error Registry, which describes the members of this page
- Error Codes, every code of the core registry