What errors can the API return?
Branch on the HTTP status before parsing a success payload.
| Status | Meaning | Action |
|---|---|---|
| 401 | Invalid authentication | Check or rotate the key |
| 422 | Invalid IP input | Correct the request |
| 429 | Limit reached | Check usage; wait or upgrade |
| 500 | Server error | Retry with backoff |
Which failures should be retried?
Retry network timeouts and 500 responses with bounded exponential backoff. Do not automatically retry 401 or 422 responses.
What should be logged?
Log status, route, timing, and a request correlation value when available. Redact Authorization and X-API-Key headers.