Skip to main content
Raptor Comply returns standard HTTP status codes with JSON error bodies. Learn how to handle 4xx and 5xx responses and retry safely in your integration.
The Raptor Comply API uses standard HTTP status codes to signal success and failure. Every error response includes a JSON body with two fields: error, a short code that identifies the error class, and message, a human-readable description of what went wrong. Building reliable integrations means checking these responses on every request and handling them appropriately.

Error response format

All error responses follow the same structure:
  • error - a short string identifying the error type. Use this for programmatic branching.
  • message - a plain-English description. Include this in logs and alerts to make debugging faster.

Common error codes

Retry strategy

Not all errors are worth retrying. Follow this rule:
  • Retryable: 429 Too Many Requests and 5xx server errors. These are transient conditions - the request itself is valid, and retrying after a delay will often succeed.
  • Not retryable: 4xx errors (except 429). These indicate a problem with the request - a missing header, a wrong ID, a malformed body. Retrying without fixing the underlying issue will not help.
For retryable errors, use exponential backoff with jitter to avoid hammering the API and making rate-limit situations worse. A good starting point: wait 1 second before the first retry, double the wait on each subsequent attempt, add random jitter, and give up after 3 to 5 attempts. Here is a Node.js helper that wraps any API call with that pattern:

Checking response status

Always check the response status before consuming the body. Here are patterns in Node.js and Python: Node.js - using fetch
Python - using requests
response.raise_for_status() throws a requests.HTTPError for any 4xx or 5xx response, and does nothing for successful 2xx responses. Catch the exception and inspect response.json() to get the error and message fields.

Getting help

If you receive persistent 500 errors or encounter unexpected behavior not explained by the error codes above, contact the Raptor Comply support team at support@raptormaps.com. Include the full error response body, the endpoint you called, and the approximate time of the request to help the team diagnose the issue quickly.
Always log the full error response body - not just the HTTP status code. The error and message fields are what tell you (and your on-call team) what actually went wrong. A log line that says "API call failed: 401" is much less useful than one that says "API call failed: Unauthorized - API key has expired".