too_many_headers
HTTP 431 · code too_many_headers · limit MaxHeaders
The request has more header fields than the server accepts.
When Photon sends it
Section titled “When Photon sends it”Sent before routing when the number of header fields exceeds MaxHeaders (100 by default). Every field counts, so a thousand copies of one header are a thousand fields.
What the client should do
Section titled “What the client should do”Send fewer headers. Large cookie jars are the usual cause.
What the server owner can do
Section titled “What the server owner can do”Raise MaxHeaders in photon.Limits if legitimate clients need more.
Example response
Section titled “Example response”{ "type": "https://photon.agenticmarket.dev/errors/too_many_headers", "title": "the request has too many header fields", "status": 431, "code": "too_many_headers", "limit": "MaxHeaders"}Match on the code field rather than on title, which is meant for people and may change. See all error codes.