Skip to main content

Error Format

Every error response has the same shape: a type you can branch on programmatically, and a human-readable message.
When an error is tied to specific input fields, the response also includes a fields array with one entry per problem field:
Use type (and the HTTP status code) to decide how your integration should react. Use fields[].field to point a user at exactly what needs fixing. Treat message and fields[].message as text for humans — they can change wording over time.

Error Types

ACTION_NOT_ALLOWED is returned for two distinct situations — a 403 (you’re not permitted to take this action at all) and a 422 (the action is disallowed by your account’s current configuration). Branch on the HTTP status code, not just the type string, to tell them apart.

Idempotency Conflicts

If you send a request with an Idempotency-Key header, HIFI stores the key alongside a hash of the request. Reusing that key later behaves differently depending on what changed:
  • Same key, same request body: while the original request is still processing, you’ll get a 409 RESOURCE_CONFLICT. Once it completes, HIFI replays the original response instead of re-executing the request (look for the Idempotent-Replayed response header).
  • Same key, different request body: you’ll get a 422 IDEMPOTENCY_KEY_CONFLICT — the key is already tied to a different payload.
General guidance:
  • 4xx errors mean the request itself needs to change — don’t retry without fixing the input.
  • 5xx errors are safe to retry with exponential backoff.
  • Log the full error body, not just typefields and message are essential for debugging.