Payload Too Large
ERR-P01-VLT-0413 - Payload Too Large
Section titled “ERR-P01-VLT-0413 - Payload Too Large”Summary
Section titled “Summary”The entry data blob exceeds the vault’s maximum byte size.
When this is raised
Section titled “When this is raised”- A
POST /vault/entriesbody has adatastring whose UTF-8 byte length is greater thanVAULT_DATA_MAX_BYTES(currently65536bytes). - Measured as encoded bytes, not character count - multi-byte characters count for more than one byte against the cap.
- The body parsed cleanly and
datais a non-empty string; only the size limit was breached.
Category note:
413is not in the transport row of the guideline’s §4 table (400,415,503), but it is a transport-level size constraint - the vault never inspects the opaque JWE payload, so an oversized blob is a transport concern, not a schema one. This page extends the transport class to cover413.
What to do
Section titled “What to do”- Reduce the size of the encrypted
datablob below the 65 536-byte cap, or split the secret across multiple entries. - Compress the plaintext before encryption if appropriate; the cap is on the stored JWE string, not the decrypted payload.
- This is a hard limit - retrying the same body will fail identically.
Server-side cause
Section titled “Server-side cause”- Raised by:
packages/vault/src/router/index.ts-POST /entrieshandler. - Guard:
if (byteLength(body.data) > VAULT_DATA_MAX_BYTES) { … }, wherebyteLengthisnew TextEncoder().encode(s).byteLengthand the cap is defined inpackages/vault/src/service/vault.ts.
Example response
Section titled “Example response”{ "type": "https://citizenry.id/errors/ERR-P01-VLT-0413", "title": "Payload Too Large", "status": 413, "code": "ERR-P01-VLT-0413", "message": "data exceeds 65536 bytes", "method": "POST", "instance": "/v1/vault/entries", "request_url": "https://api.citizenry.id/v1/vault/entries", "timestamp": "2026-05-17T07:00:00.000Z"}Related codes
Section titled “Related codes”ERR-P01-VLT-2001-datamissing or empty (vs. present but oversized).ERR-P01-VLT-0400- body was not valid JSON at all.
Changelog
Section titled “Changelog”- 0.1.0 - introduced.