Skip to main content
Fordje Connect returns structured error responses with machine-readable error codes for programmatic handling.

Error response format

All errors follow this structure:

Error code catalog

Example error responses

401 Unauthorized — missing or invalid API key

403 Forbidden — AHJ not in subscription

422 Unprocessable Entity — invalid parameter

There are two forms of 422 errors depending on the source. Business validation errors (raised by Fordje Connect when a parameter value is logically invalid) use a machine-readable error code:
Request validation errors (raised automatically when the request does not match the expected schema — wrong type, missing required field, etc.) include a details array with per-field information:
When handling 422 responses programmatically, check for both "INVALID_PARAMETER" and "Invalid request parameters" in the error field. If the details array is present, iterate over it for per-field error messages.

429 Too Many Requests — rate limit exceeded

Error handling in practice

Here are code examples showing how to handle errors from Fordje Connect, including retry logic for transient failures.

Basic error checking

Retry with exponential backoff

For transient errors (429 and 502), implement retry logic with exponential backoff:

Best practices

  • Always check response_type to distinguish success from error responses
  • Use the error field for programmatic error handling (not the description)
  • Check the warnings array on successful responses for partial access information
  • Implement retry logic with exponential backoff for 429 and 502 errors
  • For 429 responses, use the Retry-After header (seconds) to determine when to retry
  • Log the full error response body for debugging — the description field provides useful context