Error responses
← All examples19 canonical errors, one per page. Every error response from the OriginChain API uses the same JSON shape:
{
"error": "code", // short machine-readable string
"message": "human", // plain-English explanation
"retry": false // true if the same request might succeed later
}
Some errors carry extra typed fields - purchase_url on a 402, retry_after_seconds on a 429, current_version on an OCC 409, trace_id on a 500. The individual pages show those.
400 - bad request
The request reached the server, parsed, and was rejected before the engine ran it. Fix the request and resend.
The request body failed to parse as JSON. Trailing comma, unterminated string, wrong content-type.
The SQL referenced a table that is not declared in any schema for this tenant.
The translator could not resolve a column reference against the table's manifest.
A value did not match the column's declared type. String into a float column, etc.
The topk mode field has only two legal values. Anything else returns 400.
401 / 402 / 403 - auth, billing, permission
The request was authenticated or authorised incorrectly, or it asks for a paid feature the tenant hasn't enabled.
No Authorization header was sent at all. The router rejects before reaching the handler.
The header was present but did not parse as 'Bearer <token>'.
The token parsed but has been revoked from the admin console or is past its expiry.
The endpoint is gated by an addon the tenant has not enabled. Body carries a purchase_url.
The bearer is well-formed and not expired, but it does not authorise this tenant or instance.
404 - not found
The hostname, path, or resource id does not exist.
409 - conflict
The request is valid but conflicts with current state - a concurrent writer, or an already-enabled addon.
413 - payload too large
The body exceeded the per-call size cap of 8 MiB.
422 - semantically invalid
The request parsed but failed a higher-level semantic check.
429 - rate limited
Per-API-key quota exceeded. See /docs/rate-limits for the full reference.
5xx - server-side
The server hit an unexpected condition or the engine was momentarily unreachable.