Error Response Format
Every error response uses the same JSON structure regardless of the status code. Theerror field contains a machine-readable code you can use for programmatic handling, while message provides a human-readable explanation.
Always check the
error field — not just the HTTP status code — when building error-handling logic. The error value is stable and versioned; the message text may change over time.Error Code Reference
The table below covers every error code the API can return, what triggers it, and how to resolve it.Common Error Examples
401 Unauthorized
Returned when theAuthorization header is missing, malformed, or contains an invalid API key.
- The
Authorizationheader is missing entirely. - The token is prefixed incorrectly (e.g.
TokenorBasicinstead ofBearer). - The API key has been rotated or revoked in the dashboard.
400 Bad Request
Returned when a required parameter is absent or a parameter value is in the wrong format.- The
upiquery parameter is missing from aGET /v1/verify/upirequest. - A UPI VPA is not in valid
handle@providerformat. - A batch request body is missing the
vpasarray.
429 Rate Limit Exceeded
Returned when you send more requests than your plan’s rate limit allows within a given window.Retry-After header (in seconds) that tells you exactly how long to wait before sending the next request. See Rate Limits for the full breakdown of headers and handling guidance.
Retry Strategy
Different error codes call for different retry behaviors. The wrong strategy — such as retrying a400 — wastes quota and delays diagnosis.
When to Retry
Exponential Backoff Rules
- 429: Start at 1 second, double on each attempt, cap at 32 seconds. Add random jitter (±0–500 ms) to prevent thundering-herd effects when multiple clients hit the limit simultaneously.
- 500 / 503: Retry up to 3 times using the same doubling pattern (1s → 2s → 4s).
- 4xx (except 429): Do not retry. The request is semantically invalid — retrying will produce the same error.
Python Retry Example
The example below shows two approaches: a simple manual loop and a cleaner implementation using thetenacity library.
Getting Help
If you consistently receive500 errors that do not resolve after retrying, or if you believe an error is caused by a platform issue rather than a request problem, contact the FraudTrace AI support team with the full response body and the timestamp of the failing request. Including the X-Request-Id response header (if present) will significantly speed up diagnosis.