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
| Status | Code | Description |
|---|---|---|
400 | BAD_REQUEST | The request was malformed or contained invalid parameters. |
401 | UNAUTHORIZED | Missing, invalid, or inactive API key in the Authorization header. |
404 | NOT_FOUND | The requested resource was not found. |
429 | RATE_LIMITED | Rate limit exceeded. Check the Retry-After header for when to retry. |
500 | INTERNAL_ERROR | An unexpected server error occurred. Try again later. |