Skip to main content

Error shape

Every error is JSON with an error message:
Some errors carry more fields:
Branch on the HTTP status, and on code where one is given. The error text is for people and can change.

By status

404 does not tell “doesn’t exist” apart from “belongs to another organization”. This is on purpose, so ids from other organizations can’t be discovered.

Eligibility code values

Eligibility errors (POST /benefits/eligibility-checks) carry a code:
Every eligibility retry is a new, billable payer request. Retry only the statuses marked above, and wait before you do.

Retrying safely

  • Retry 429, 500, 502, 503 and 504 with exponential backoff (for example 1, 2, 4, 8 seconds), and honor Retry-After when it is sent.
  • Exception: eligibility checks. Each retry is a new billable payer request. Retry only 502, 503 and 504, after a wait. After a 500, list recent checks to see whether the check was saved before running it again.
  • Don’t retry other 4xx errors without changing the request.
  • Before retrying a write that may have succeeded (a timeout or a lost response), check the endpoint’s Safety box in the API Reference. Some writes create a new record on every call; for those, look the record up first, for example by external_id.