Error response format
Every error response includes a JSON body with the following structure:A machine-readable code identifying the type of error. Use this for programmatic error handling.
Legacy alias for
error_code. Both fields always contain the same value. New integrations should use error_code.A human-readable description of the error. Useful for debugging and logging. Not all errors include a message.
Error codes reference
Authentication & authorization
OAuth errors
An OAuth access token that is invalid, expired or revoked, or that lacks the route’s scope, gets an OAuth error body and aWWW-Authenticate header instead of the format above:
The OAuth endpoints (
/oauth/register, /oauth/token, /oauth/revoke) answer with the standard OAuth 2.1 error codes in the same error and error_description format. The ones an app is most likely to see:
Request validation
File upload
Long-running operations
Reviews
Questions & sessions
Artifacts
Playbooks
Reports
Repositories
Sharing & members
Research & search
Tasks
Audit feed
Webhook endpoints
Rate limiting & credits
Server errors
Handling errors
Recommended approach
- Check the HTTP status code to determine the error category (4xx = client error, 5xx = server error).
- Switch on
error_codefor specific handling logic (e.g., retrying onrate_limit_exceeded, re-uploading oninvalid_upload_job). - Log the
messagefor debugging purposes.
Retry strategy
- 429 (rate_limit_exceeded): Wait for the
Retry-Afterheader’s value, then retry, backing off exponentially if you are limited again. See Rate limits. - 500 (internal_error): Retry up to 3 times with backoff. If the error persists, contact support.
- 429 (upstream_rate_limited): Retry after a minute.
- 409 (upload_completion_in_progress): Retry after a short wait.
- 503 (artifact_export_unavailable, temporarily_unavailable, research_source_unavailable, upstream_timeout): Retry after a short wait, backing off if it happens again.
- 400/401/403/404: Do not retry — fix the request or credentials first. The exception is a 403
protected_contentwithreasonprotection_unavailable: retry after a short wait. - 400 (task_thread_reply_partially_delivered): Never retry. The reply was already sent.
- 400 (task_thread_reply_draft_incomplete): Never retry. The draft already exists.