Getting started

Errors

A failed call returns JSON with success set to 0 and an error code. You never get an HTML error page.

Error format

Check success on every response. When it is 0, there are no results and the body carries the error:

application/json
{
  "success": 0,
  "error": "PARAM_REQUIRED",
  "error_detail": "sport_id"
}
  • error is a stable, uppercase code. Branch on it in your code.
  • error_detail is optional. For PARAM_REQUIRED and PARAM_INVALID it names the parameter.

Error codes

These codes are also listed in the glossary as R-Errors.

Error codes
errorMeaning
INTERNAL_SERVER_ERROR500 Internal Server Error. Contact support if it keeps happening.
NOT_FOUND404 Not Found.
METHOD_NOT_ALLOWEDMethod is not allowed, only GET is supported.
UNDER_MAINTENANCEAPI is under maintenance. We announce it in advance.
AUTHORIZE_FAILEDToken is not provided or is incorrect.
TOO_MANY_REQUESTSAPI rate limit exceeded. See X-RateLimit-Reset.
PERMISSION_DENIEDYour plan does not include this call. Contact support if this is wrong.
PARAM_REQUIREDA required param is missing. Check error_detail.
PARAM_INVALIDA param is invalid. Check error_detail.

Handling errors

  • AUTHORIZE_FAILED, PERMISSION_DENIED, PARAM_REQUIRED and PARAM_INVALID fail again with the same call. Fix the token, plan or parameters first.
  • NOT_FOUND on an event id: the event may have been merged into another one. Check Merge History.
  • TOO_MANY_REQUESTS: wait until the UTC epoch in X-RateLimit-Reset. See Rate limits.
  • INTERNAL_SERVER_ERROR and UNDER_MAINTENANCE: retry with exponential backoff, for example after 1, 2, 4 and 8 seconds. If an internal error persists, contact support with the time and path of the call.
  • METHOD_NOT_ALLOWED: every endpoint takes GET only.