Errors
One error shape, nine codes, and what to do about each.
Every error has the same shape:
{"error": {"code": "upgrade_required", "message": "...", "plan": "archive", "docs": "https://cricketdatabase.com/documentation/guides/plans"}}
Decide what to do from code, which does not change; message is for people and may be reworded.
| Status | Code | What to do |
|---|---|---|
| 400 | bad_request | Fix the value the message names; a key in the address, or a method other than GET, also answers this |
| 401 | unauthorized | Send a current key; the message says whether it was missing, unknown or revoked |
| 403 | upgrade_required | plan names the plan that opens it |
| 404 | not_found | Check the address; search finds the right one |
| 404 | no_ball_by_ball | The match is held with its scorecard but not its balls (coverage scorecard): the scorecard call answers it, the deliveries, overs and partnerships calls do not; not counted against your day |
| 404 | no_scorecard | The match is held without its scorecard (coverage totals or result_only): ask for the match itself, which answers with its innings totals or its result; not counted against your day |
| 422 | unknown_parameter | Drop or correct the parameter named; allowed lists the ones this endpoint takes |
| 429 | rate_limited | Too fast: wait for Retry-After, a few seconds |
| 429 | quota_exceeded | The day's calls are used: wait for midnight UTC, or move to a larger plan |
| 500 | server_error | Try again later; it has been logged |