Skip to content

Errors

Errors use RFC 9457 problem details with the media type application/problem+json. Every problem has a title, the HTTP status, a stable machine-readable code and a human-readable detail. Upload errors also include the upload’s trace_id.

api/specs/examples/problem.json (contract fixture)
{
"title": "Conflict",
"status": 409,
"code": "result_pending",
"detail": "The document is still processing."
}

Branch on the HTTP status and code. Show detail to people, but do not parse it: its wording can change.

This table is rendered from the contract’s error mapping in api/specs/service-interfaces.md.

WhereStatus and codeMeaning
Any authenticated operation401 invalid_api_keyBearer credential missing or invalid.
Document read or ticket request404 document_not_foundID unknown or outside the caller's scope.
Upload400 invalid_request, 413 upload_too_large, 415 unsupported_media_type, 422 invalid_optionsMalformed request, size limit exceeded, wrong content type, or invalid chunk size, profile, or export selection.
Upload422 invalid_pdfAdmission detected an empty or invalid PDF. A parse failure discovered after acceptance instead appears in the document snapshot.
Result or file read on an authorized document409 result_pending or 409 document_failedThe document is still processing or ended in failure. A status read returns 200 in either case.
File read on a successful document404 artifact_not_foundThe requested name is absent from the published manifest. Only listed filenames identify downloadable files.
History read400 invalid_request or 409 event_cursor_unavailableInvalid pagination parameters, or a valid cursor outside the retained replay window.
Upload or owner route503 owner_busy or 503 owner_unavailableAdmission capacity is exhausted or the owning instance is offline. An offline owner cannot serve its existing documents.
Response Retry?
429 quota_exceeded, 503 owner_busy Yes, after the Retry-After seconds
409 admission_in_progress Yes, after Retry-After, with the same Idempotency-Key
409 result_pending Yes, once the status shows succeeded; read the status instead of polling the manifest
503 owner_unavailable, 503 control_plane_unavailable Yes, with backoff
Network errors and timeouts on upload Yes, with the same Idempotency-Key
Other 4xx No. Fix the request first.

Processing failures after upload are not HTTP errors: the upload succeeded, and the document’s status reports failed with a failure object.