Rest API Errors
Brave New Coin uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx
range indicate success. Codes in the 4xx
range indicate an error that failed given the information provided (e.g. A required parameter was missing). Codes in the 5xx
range indicate an error with Brave New Coin's servers.
Some 4xx
errors that could be handled programmatically include an error code that briefly explains the error reported.
Brave New Coin uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx
range indicate success. Codes in the 4xx
range indicate an error that failed given the information provided (e.g. A required parameter was missing). Codes in the 5xx
range indicate an error with Brave New Coin's servers.
Some 4xx
errors that could be handled programmatically include an error code that briefly explains the error reported.
HTTP status code summary
HTTP Code | Description |
200 - OK | Everything worked as expected |
400 - Bad Request | The request was unacceptable, often due to missing a required parameter. |
401 - Unauthorized | No valid OAuth2 token provided |
403 - Forbidden | Not authorized to access this resource (please contact sales about adding access to your profile). |
404 - Not Found | The requested resource doesn't exist |
409 - Conflict | The request conflicts with another request (perhaps due the resource was updated) |
429 - Too Many Requests | Too many requests hit the API too quickly. We recommend an expontential backoff of your requests. |
500, 502, 503, 504 - Server Errors | Something went wrong on Brave New Coin's end. (These will be rare). |
Handling Errors
Our API libraries raise exceptions for many reasons, such as invalid parameters, authentication errors, and network unavailability. We recommend writing code that gracefully handles all possible API exceptions.