Skip to main content

Errors

Every error response uses a consistent JSON envelope so you can handle failures uniformly.

Envelope shape

{
"error": {
"code": "not_found",
"message": "Program not found",
"requestId": "7c0c1e9b-9c2b-4f7e-9c91-7b9c8e2c1a93"
}
}
  • code: a stable, machine-readable error code (see below).
  • message: human-readable detail. May change; don't branch on it.
  • requestId: echoes your X-Request-Id header if you sent one, otherwise a server-generated UUID. Include it when contacting support.

Error codes

CodeTypical statusMeaning
invalid_request400, 405Malformed body, parameters, or method.
unauthorized401Missing, invalid, revoked, or expired API key.
forbidden403The key's scope doesn't allow this action (e.g. a write with a read_only key).
not_found404Resource missing, or not owned by your team.
conflict409Idempotency-Key collision, or the resource isn't in a state that allows the operation.
rate_limited429Request quota exceeded.
internal_error422, 500, 503The Engine failed to compute a result (422), an unexpected server error (500), or the Engine is unreachable (503).

Status codes

StatusMeaning
400Invalid request: malformed input, parameters, or a missing Idempotency-Key on a write.
401Missing, invalid, revoked, or expired bearer token.
403The API key lacks the required scope.
404Resource not found (or not owned by your team).
409Idempotency-Key reused with a different body, or the resource isn't ready (e.g. creating a program before the part finishes processing).
422Well-formed but unprocessable; the Engine reported an error for this resource.
429Rate limit exceeded.
500Unexpected server error.
503The Engine is unavailable. The write was rolled back; retry later.

Handling errors

  • Branch on the error.code, not the human-readable message; messages may change.
  • Treat 429 and 5xx responses as retryable with backoff.
  • A 409 from creating a program usually means the part isn't ready yet. Poll the part, then retry; a new Idempotency-Key is not needed if the body is unchanged.
  • Other 4xx responses indicate a problem with the request itself. Fix it before retrying.

See the API Reference for the per-endpoint list of error responses. Each documented status shows the specific code it returns.