Skip to content

Payload too large

payload_too_largeHTTP 413Retrying the same request will not help

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.

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: maxBody in TypeScript, maxBodyBytes on the JVM.

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
}

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.

Released under the Apache-2.0 license.