Skip to content

limit_exceeded

HTTP 413 · code limit_exceeded · limit MaxRequestBodyBytes

The request body is larger than the server accepts.

Sent before reading the body when Content-Length exceeds MaxRequestBodyBytes (1 MiB by default), and by DecodeJSON when a body without a declared length overflows mid-read. The limit field names the limit. photonerr.HeaderTooLarge(limit) uses the same code with status 431.

Send a smaller body, or split the work into several requests.

Raise MaxRequestBodyBytes in photon.Limits if larger bodies are legitimate, ideally only for the routes that need them.

{
"type": "https://photon.agenticmarket.dev/errors/limit_exceeded",
"title": "limit exceeded",
"status": 413,
"code": "limit_exceeded",
"limit": "MaxRequestBodyBytes"
}

Match on the code field rather than on title, which is meant for people and may change. See all error codes.