Bad Request
ERR-P01-VLT-0400 - Bad Request
Section titled “ERR-P01-VLT-0400 - Bad Request”Summary
Section titled “Summary”The request body could not be parsed as JSON.
When this is raised
Section titled “When this is raised”- A
POST /vault/entriesrequest carries a body that is not well-formed JSON (for example, a truncated payload, a trailing comma, or a non-JSON content stream). - Raised before any field-level validation - the parser never produces a value to inspect.
- A syntactically valid JSON body that is merely missing or has an empty
datafield is not this code; that isERR-P01-VLT-2001.
What to do
Section titled “What to do”- Serialize the body with a conforming JSON encoder and resend.
- Ensure the request actually contains a body and that any client-side framing (chunking, compression) is correct.
- This is always a client-side framing error; the server inspected nothing.
Server-side cause
Section titled “Server-side cause”- Raised by:
packages/vault/src/router/index.ts-POST /entrieshandler. - Guard: the
try { await c.req.json() } catch { … }block that wraps body parsing emits400 / VAULT_ERR.bad_requeston any parse failure.
Example response
Section titled “Example response”{ "type": "https://citizenry.id/errors/ERR-P01-VLT-0400", "title": "Bad Request", "status": 400, "code": "ERR-P01-VLT-0400", "message": "body must be valid JSON", "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- body parsed but failed field validation (missing or emptydata).ERR-P01-VLT-0413- body parsed but thedatablob exceeds the size cap.
Changelog
Section titled “Changelog”- 0.1.0 - introduced.