How errors are returned
The Integrations API does not use a universalerror_code field, and it does not return a request_id. Instead, errors are signalled by the HTTP status code and one of four response body shapes. Always branch on response.status_code first, then read the body shape that matches.
Error envelope shapes
- Domain error
- Validation error (422)
- Rate limit (429)
Most domain errors return a The
detail message. Some also include a docs_url pointing at the relevant documentation.docs_url field is optional. Authentication failures (401) use this shape with messages such as Missing X-API-Key header, Invalid API key, This API key has expired, or This API key has been revoked.Status codes
Common situations
These are real conditions you will encounter, described by status code and the style ofdetail message returned. There are no error-code constants to match against.
Retry guidance
Do not retry 400, 401, 402, 403, 404, 409, 413, 415, or 422 without changing the request. They indicate a problem with the request, the resource, or your plan that a retry alone cannot resolve.
Handling errors in code
Branch on the status code, then read the matching body shape. Readdetail for domain errors and the fields array for validation errors. Do not look for error_code (except on 402) or request_id (which does not exist).
Retry-After header before retrying. See Rate limiting for a complete backoff example.
Need help?
- Note the HTTP status code and the
detailorfieldsmessage - Review the Error handling guide
- Contact support at https://support.iclear.ai/ with the status code and message