Documentation / Guides
Errors
Every error code, and what to do about each.
Every error is one shape:
{"error": {"code": "upgrade_required", "message": "…", "plan": "results", "docs": "https://horseracingapi.org/documentation/errors"}}
The code is for your code and never changes; the message is for people.
| Status | Code | What to do |
|---|---|---|
| 400 | bad_request | A value is the wrong shape: a date that is not YYYY-MM-DD, an id that is not ours, a key sent in the address. The message names it. |
| 401 | unauthorized | No key, or one we do not know. Send it in X-API-Key; check your account for the current one. |
| 403 | upgrade_required | Your plan does not open this endpoint. The answer names the plan that does. |
| 404 | not_found | No record with that id, a date before 1 January 2022, or no endpoint at that address. |
| 422 | unknown_parameter | A parameter this endpoint does not take. The answer lists the ones it does. |
| 429 | rate_limited | Over your calls a minute. Wait the Retry-After seconds. |
| 429 | quota_exceeded | Your allowance is used. The answer says when it comes back. |
| 500, 503 | server_error | On our side. Try again in a minute; it is logged and we see it. |