-
Notifications
You must be signed in to change notification settings - Fork 0
Error Handling
briansemify edited this page Oct 20, 2025
·
1 revision
General format
- Success responses include
error: falseanddata. - Error responses often include
error: trueandmessagesormessage.
Common errors
- 401 Unauthorized — invalid/expired token
- 400 Bad Request — missing or invalid params
- 404 Not Found — invalid resource id
- 429 Rate Limit — slow down requests, implement exponential backoff
- 500 Internal Server Error — retry with backoff, optionally alert
Retries & backoff
- Use exponential backoff with jitter for retries.
- For non-idempotent requests (POST create), check response before retrying to avoid duplicates — prefer idempotency via external identifiers (e.g., external_account_identifier).
Logging
- Log full request and response (sanitized of secrets) for troubleshooting.
- Capture request IDs returned by the API for support escalations.