Errors
Branch on the status and the code. Retry only what can succeed on a second try.
Error responses
An error answers with JSON: error (a message for people), and usually code (stable, for programs) and requestId. Branch on the status and code, never on error. Errors from the edge, such as a WAF refusal, may not be JSON.
{
"error": "Authentication is required.",
"code": "AUTHENTICATION_REQUIRED",
"requestId": "01a2230b-4bad-7b8c-8066-512bb9ee46c7"
}Error codes
| Status | Code | Meaning and what to do |
|---|---|---|
| 400 | INVALID_REQUEST | A parameter or body outside the contract, or a key in the URL. error names the problem. Fix the request; do not retry it unchanged. |
| 401 | AUTHENTICATION_REQUIRED | No key, or a malformed, expired, paused or revoked one. Check the integration in Settings; rotate if the key was lost. |
| 403 | PERMISSION_DENIED | The key lacks this operation's permission (the export needs Bulk data export). Plain HTTP and edge refusals are also 403. |
| 404 | NOT_FOUND, RESOURCE_NOT_FOUND or none | The record does not exist or is not public, or the operation is switched off. A list answers 200 with no items instead. |
| 405 | none | Method not allowed: Allow lists the methods. |
| 413, 415 | PAYLOAD_TOO_LARGE, UNSUPPORTED_MEDIA_TYPE | The body is too large or not application/json. |
| 422 | INVALID_REQUEST | The body parsed but cannot be answered as asked: error says why. |
| 429 | RATE_LIMITED | A budget is used up. Wait Retry-After seconds; see Rate limits. |
| 500 | none | The server failed. Retry a few times with backoff, then tell World Wide the time, operation and any requestId. |
| 503 | SEARCH_UNAVAILABLE, IDENTITY_UNAVAILABLE or UNAVAILABLE | Search, sign-in or usage accounting is briefly unavailable. Retry after Retry-After, or back off. |
Retries
Retry 429 and 503 after Retry-After. Without it, and for 500, 502 and 504, back off: wait 1 second, double the wait each time up to 30 seconds, and stop after five attempts. Do not retry any other 4xx: the same request gets the same answer.
Request ids
Most errors carry a requestId. When the table above does not explain a failure, write to World Wide with the time, the operation and the requestId: info@world-wide.org.