Payload too large
The request body is bigger than the server accepts. Nothing was read past the limit and nothing ran.
Why it happens
- A request body over the server's limit, 1 MiB unless the server changes it.
- A file sent to the upload route over that route's own limit, 25 MiB unless the server changes it.
What to do
- Send less in one request, for example by splitting a large batch.
- If large bodies are expected, raise the limit on the server:
maxBodyin TypeScript,maxBodyByteson the JVM. - For a file, raise the upload route's
maxBytes, or hand the client a URL from object storage for very large files.
What it looks like
Inside a batch, the operation's frame carries it:
json
{
"id": 1,
"error": {
"code": "resource_exhausted",
"message": "Body exceeds 1048576 bytes"
},
"fin": true
}retryable appears only where it differs from the code's default, which is the one at the top of this page.
When the whole request is refused over HTTP, the answer is a problem document:
json
{
"type": "https://eddyboutros.github.io/rayfold/errors/payload_too_large",
"title": "payload too large",
"status": 413,
"detail": "Body exceeds 1048576 bytes",
"code": "resource_exhausted"
}See also all error types and the errors chapter of the specification.