limit_exceeded
HTTP 413 · code limit_exceeded · limit MaxRequestBodyBytes
The request body is larger than the server accepts.
When Photon sends it
Section titled “When Photon sends it”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.
What the client should do
Section titled “What the client should do”Send a smaller body, or split the work into several requests.
What the server owner can do
Section titled “What the server owner can do”Raise MaxRequestBodyBytes in photon.Limits if larger bodies are legitimate, ideally only for the routes that need them.
Example response
Section titled “Example response”{ "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.