Skip to content

header_value_too_large

HTTP 431 · code header_value_too_large · limit MaxHeaderValueBytes

One header value is longer than the server accepts.

Sent before routing when a single header value exceeds MaxHeaderValueBytes (8 KiB by default). The message names the header but never echoes its value.

Shorten the named header, typically an oversized cookie or token.

Raise MaxHeaderValueBytes in photon.Limits if legitimate tokens are larger.

{
"type": "https://photon.agenticmarket.dev/errors/header_value_too_large",
"title": "header too large",
"status": 431,
"code": "header_value_too_large",
"limit": "MaxHeaderValueBytes"
}

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