Errors and status codes
What the status codes mean, the shapes error bodies come in, and how your client should react.
ReferenceAPI: errors and status codes — Overview
Published endpoints (see API: base URLs and regions) report errors as an HTTP status code plus one of a small number of body shapes. There is no single custom envelope: depending on where in the stack a request fails, the client sees an RFC 7807 problem-detail JSON body, a plain-text message, Spring Boot's own error JSON, or no body at all. A well-behaved client should branch on the HTTP status code first — it is the only part guaranteed to be present and stable — and treat the body as best-effort diagnostic detail, matched against its Content-Type.
ReferenceAPI: errors and status codes — Status codes by situation
| Status | Meaning | When the platform returns it |
|---|---|---|
| 400 Bad Request | Missing or malformed parameter, or failed validation | A request has parameters or a body to validate; also used for constraint violations, and for some data-layer client errors (bad data, invalid API usage) that are mapped onto 400 for historic-contract reasons |
| 401 Unauthorized | Missing, expired or invalid credentials | The security filter chain rejects the request before any handler runs; an API- token fails to exchange for an access token (invalid/disabled token, or the exchange service is unreachable after 3 retries); a session token is expired or inactive; a token that was entered with a support access code is refused because that code has been revoked, or because the platform cannot currently confirm which codes are revoked (it refuses such tokens rather than letting them through) |
| 403 Forbidden | Token is valid but lacks permission for this resource or company | Authorization checks reject the caller for the addressed resource; endpoints requiring one can also throw this explicitly |
| 404 Not Found | No such resource, or it is not visible to this token | Declared for any operation with a path parameter — an id that does not exist, or does exist but is outside the caller's company/visibility, is indistinguishable from the outside |
| 409 Conflict | The request conflicts with the resource's current state | Explicit conflict handling in a service, and two categories of data-layer contention: optimistic locking failures (stale version — re-read before retrying) and pessimistic/row-lock contention (retryable) |
| 423 Locked | The resource is locked | A small number of operations reject a request while the target resource is held locked |
| 429 Too Many Requests | Caller exceeded a rate or concurrency limit | The API gateway's rate limiter rejects the request when the caller's (or IP's, for anonymous callers) concurrent-request or per-window rate budget is exhausted; also used for a small number of per-service application-level throttles |
| 500 Internal Server Error | Unhandled server-side failure | Anything not mapped to a more specific status; kept generic on purpose — no internal detail is included in the body |
| 503 Service Unavailable | Dependency is unavailable, or the platform is fail-fast | A transient/infra-level data-access failure, or the API gateway's circuit breaker rejecting the call before dispatching it to a sick upstream (carries an X-Error-Code: circuit.open response header in that case) |
404 is only declared for operations that take a resource id as a path parameter; a 400 is only declared for operations that accept parameters or a request body — there is nothing to reject otherwise.
ReferenceAPI: errors and status codes — The response shapes
The platform never declares a schema for 5xx responses by design — a documented 500 would make a server error look spec-conformant. For 4xx, different layers answer differently:
| Shape | Content-Type | Produced by | Typical fields |
|---|---|---|---|
| Problem detail | application/problem+json |
Standard framework exception handling, e.g. bean validation failures and constraint violations on save | type, title, status, detail, instance |
| Plain text | text/plain |
The platform's common exception handling for bad requests and data-layer errors, which returns a bare message string | just a string body |
| Servlet error | application/json |
Standard error handling, when a request is rejected before reaching a handler | timestamp, status, error, message, path |
Some 401, 403 and 404 responses carry no body at all: the security filter chain rejects unauthenticated or unauthorized requests before any handler runs and writes just the status code.
Check Content-Type to decide how to parse: application/problem+json → problem-detail fields, application/json → servlet-error fields, anything else → opaque message. Always fall back to the status code and a generic message if the body does not parse.
For validation failures (a request body that fails validation, or an update that fails a constraint on save) the detail field of the problem-detail body lists the offending fields as <field> <message>, <field> <message>, ... instead of the generic "Invalid request content."
ReferenceAPI: errors and status codes — How clients should react
- Branch on status code, not body shape. Parse the body only after checking
Content-Type; the same operation can answer with a problem-detail JSON, a plain-text message, Boot's servlet-error JSON, or no body at all, depending on which layer rejected the request. - 400 — fix the request. If the body is a problem-detail JSON, read
detailfor the specific field(s) and message(s) that failed validation; do not retry unmodified. - 401 — the credentials are missing, expired, or (for an API token) failed to exchange; re-authenticate or refresh the token rather than retrying the same request. If the token was entered with a support access code, a 401 can also mean the code was revoked, or that the platform could not check revocations for the moment. A revoked code is final: obtain a new access code. If you suspect the check was only temporarily unavailable, wait a few minutes and retry once before asking for a new code.
- 403 — the token is valid but the caller's role/company does not permit this resource or operation; retrying will not help without a permission or company change.
- 404 — treat as "not found or not visible to you"; the platform does not distinguish a genuinely missing id from one outside the caller's company or share scope, so do not use a 404 to infer whether a resource exists.
- 409 — re-read the resource's current state before retrying a write; on an optimistic-locking conflict a blind retry resends the same stale version and will fail again.
- 429 — back off and retry after a short delay; consider reducing concurrency, batching requests, or switching to an API token if calling anonymously or as an interactive user at volume.
- 500 — treat as an unexpected server-side bug; the body is intentionally generic, so capture the request id/timestamp from your own logs rather than relying on response content, and avoid tight-loop retries.
- 503, including the
X-Error-Code: circuit.openvariant — the platform or one of its dependencies is temporarily unavailable, or the gateway is fail-fasting to protect a struggling upstream; retry with backoff, since the condition is expected to clear.
For changes to specific endpoints' request/response shapes over time, see the API changelog.