Error Handling
Error Handling
Requests made to the Roanuz Cricket API server can sometimes result in errors. These errors are of different kinds, and are communicated through the “error” object in the response. The errors are classified in a relevant and self-explanatory manner.
HTTP Status Codes
The HTTP response status codes indicate if a specific HTTP request has been completed successfully.
The responses can be usually classified into five categories:
For a comprehensive list of Status codes, visit HTTP response status codes - MDN web docs.
100-199 | Informational responses |
200-299 | Successful responses |
300-399 | Redirects |
400-499 | Client errors |
500-599 | Server errors |
Common Errors:
Some of the error codes you might run into while using the endpoints and ways to resolve them.
HTTP Status | 400 |
Error Code | |
Reason | Invalid input to process |
HTTP Status | 400 |
Error Code | |
Reason | Invalid Project Key provided |
HTTP Status | 400 |
Error Code | |
Reason | Invalid Page Key provided |
HTTP Status | 401 |
Error Code | |
Reason | Invalid access token to process |
HTTP Status | 402 |
Error Code | |
Reason | Project is inactive |
HTTP Status | 403 |
Error Code | |
Reason | Access is limited to specific user groups |
HTTP Status | 404 |
Error Code | |
Reason | Resource not found |
HTTP Status | 500 |
Error Code | |
Reason | Unknown error |
Authentication API errors
A few error codes that are specific to the Authentication API endpoint and how to resolve them.
HTTP Status | 400 |
Error Code | |
Reason | Invalid API Key provided |
Associations by Country API errors
The following error code is specific to the Associations by Country API endpoint.
HTTP Status | 400 |
Error Code | |
Reason | Invalid country code provided |
Subscription Endpoint Errors:
A few error codes that are specific to the Subscription API endpoints and how to resolve them.
HTTP Status | 400 |
Error Code | |
Reason | Subscription not configured on your project for the requested delivery method |
HTTP Status | 400 |
Error Code | |
Reason | Invalid push delivery method |
HTTP Status | 400 |
Error Code | |
Reason | Subscription not supported for the requested delivery method |
HTTP Status | 400 |
Error Code | |
Reason | This resource is already subscribed for the requested delivery method |
HTTP Status | 403 |
Error Code | |
Reason | Subscription is disabled on your Project |
HTTP Status | 403 |
Error Code | |
Reason | Requested Resource Subscription not Authorized |