Errors
Every error has the same shape and a stable code to switch on. The message is written for a person and may change; the code will not.
{ "error": { "code": "plan_required", "message": "Archive is needed for /v1/players/{id}.", "plan": "archive", "upgrade": "https://rugbyapi.com/pricing" } }
| Status | Codes |
|---|---|
400 | key_in_address: the key was sent in the address; send it in a header |
401 | missing_key, invalid_key, revoked_key |
403 | plan_required, with plan and upgrade |
404 | not_found, bad_id, no_such_endpoint |
405 | method_not_allowed |
422 | unknown_parameter, bad_parameter, missing_parameter |
429 | daily_limit, with resets_utc |
5xx | internal_error (logged on our side), not_available, archive_unavailable (retry in a minute) |
Unknown parameters are refused rather than ignored, so a typo never quietly returns everything.