Errors

All errors follow a consistent format with HTTP status codes and machine-readable error codes.

Error Response Format

When an error occurs, the API returns a JSON response with an error object:

json
{
  "error": {
    "status": 404,
    "message": "Tournament not found",
    "code": "NOT_FOUND"
  }
}

Error Fields

Every one of these sits inside the error object.

statusinteger
The HTTP status code, repeated here so you do not have to dig it out of the response headers.
messagestring
Human-readable description of the error.
codestring
Machine-readable error code for programmatic handling.

Error Codes

StatusCodeDescription
400BAD_REQUESTThe request was malformed or contained invalid parameters.
401UNAUTHORIZEDMissing, invalid, or inactive API key in the Authorization header.
404NOT_FOUNDThe requested resource was not found.
429RATE_LIMITEDRate limit exceeded. Check the Retry-After header for when to retry.
500INTERNAL_ERRORAn unexpected server error occurred. Try again later.