Error Format
Every error response has the same shape: atype you can branch on programmatically, and a human-readable message.
fields array with one entry per problem field:
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 anIdempotency-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 theIdempotent-Replayedresponse header). - Same key, different request body: you’ll get a
422 IDEMPOTENCY_KEY_CONFLICT— the key is already tied to a different payload.
- 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
type—fieldsandmessageare essential for debugging.