Error body shape
On any error, return a JSON body with anerror string. HunterAI reads it into the failure
detail it records for the sync:
Status codes
“The entity fails” means that one entity (e.g.
/leads) is marked failed for the run;
entities that already committed stay committed. See
Partial success.401 Unauthorized
- No retry — HunterAI stops the entity the instant it sees
401. - Nothing from an unauthenticated call is ingested.
- Every entity in the run hits the same
401, so the whole sync ends failed.
404 Not Found
404 is how you declare an optional endpoint unimplemented.
429 and 5xx errors
Both are treated as transient and retried up to 5 times before the entity fails.429— HunterAI waits for the larger of yourRetry-Afterheader (seconds, floored to 1s) and an exponential backoff (1, 2, 4, 8, 16s).5xx— HunterAI backs off exponentially (1, 2, 4, 8, 16s) and retries.
Other 4xx — hard failure
400, 403, 422, and any other 4xx that is not 401, 404, or 429 fail the entity
immediately with no retry. Reserve these for genuine client errors; do not use them for
throttling (use 429) or transient issues (use 5xx).