Skip to content

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

200OKRequest was successful and intended action was carried out.
201CreatedA resource has successfully been created.
400Bad RequestThe request was unacceptable.
422Unprocessable EntityThe request was unacceptable, often due to validations.
401UnauthorizedNo valid API key provided.
404Not FoundRequest could not be fulfilled as the request resource does not exist.
429Too Many RequestsToo many requests hit the API too quickly. We recommend an exponential backoff of your requests.
5xxServer ErrorsSomething 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"
}