CoherenceDevelopers

Concepts

Errors

Errors use standard HTTP status codes and one JSON shape, so one handler covers every endpoint.

Response
{
  "error": {
    "code": "invalid_request",
    "message": "Some fields are missing or invalid.",
    "details": [{ "path": "product_name", "message": "Too short" }],
    "request_id": "3f6c1a52-8d0e-4c1b-9a51-2f3e4d5c6b7a"
  }
}

Branch on code; message is written for a person. details lists field problems as path and message. Every response carries an X-Request-Id header; include it when you write to us.

Codes

StatusCodeMeaning
400invalid_requestSomething in the request is missing or wrong. details says what.
401unauthorizedNo key, an unknown key, or an expired or revoked one.
403insufficient_scopeThe key doesn’t have the permission this needs.
403licence_requiredThe workspace has no Business licence for this tool.
403forbiddenThe key’s creator can no longer do this, e.g. they became a viewer.
404not_foundNothing with that id in your workspace, or no such endpoint.
405method_not_allowedThe endpoint exists but not with this method.
409conflictE.g. an idempotency key reused with a different body.
429rate_limitedToo many requests. Wait Retry-After seconds.
429allowance_exceededThe tool’s daily or monthly allowance is used.
429concurrency_limitToo many jobs running at once, e.g. two briefs already.
500internal_errorOur side. Safe to retry with the same idempotency key.
503service_unavailableBriefly unavailable. Retry after a short wait.
503queue_unavailableThe job was saved but not queued. Retry with the same key.

A 401 also carries a WWW-Authenticate header.