Errors
Bunce 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 key was omitted, etc.). Codes in the 5xx
range indicate an error with Stripe’s servers (these are rare).
HTTP Status Codes
200 | OK | Request was successful and intended action was carried out. |
201 | Created | A resource has successfully been created. |
400 | Bad Request | The request was unacceptable. |
422 | Unprocessable Entity | The request was unacceptable, often due to validations. |
401 | Unauthorized | No valid API key provided. |
404 | Not Found | Request could not be fulfilled as the request resource does not exist. |
429 | Too Many Requests | Too many requests hit the API too quickly. We recommend an exponential backoff of your requests. |
5xx | Server Errors | Something went wrong on Bunce's end. (These are rare. Please report as soon as you encounter any instance ) |
Error Object
When you encounter an error, the API returns an error object rather than a data object or array.
json
{
"success": false,
"message": "ID param is not valid UUID"
}
json
{
"success": false,
"message": "first_name is required and must be present"
}