Developers /Documentation

Errors & retries

Use stable error codes to understand failures and decide what to do next.

Error response

Errors include a human-readable message and a stable code. Some errors include a details object.

Illustrative error
{
  "success": false,
  "error": "missing API key: send Authorization: Bearer <key>",
  "code": "unauthorized"
}

Status codes

HTTPCodeWhat to do
400invalid_requestCheck the request fields.
401unauthorizedCheck the key and its scopes.
402insufficient_creditsReview the account allowance.
403target_blockedInspect the policy or network block reason.
404not_foundCheck the resource ID and account.
408timeoutReview the source and request timeout.
413payload_too_largeReduce the document size (Docs).
415unsupported_documentUse a supported document (Docs).
422target_failed / watch_unresolved / document_failedInspect the source or document error details.
429rate_limitedWait according to Retry-After.
503unavailableRetry later with backoff.

Schema-validation responses may also use HTTP 422 with a validation detail array.

Retry behavior

For rate limits, respect the Retry-After header. Use bounded exponential backoff for temporary availability failures. Correct invalid requests and authorization failures before retrying.

For a timed-out job creation request, check existing jobs before creating another one. Do not assume retries are idempotent.