Errors
Bazoom uses conventional HTTP response codes to indicate whether your request was successful or not.
You can tell if your request was successful by checking the status code of any response from the API. If a response comes back unsuccessful, you can use the error type and error message to figure out what has gone wrong and do some debugging.
Status codes
Here is a list of the different categories of status codes returned by the Bazoom Client API.
- Name
2xx- Description
A 2xx status code indicates a successful response.
- Name
4xx- Description
A 4xx status code indicates a client error, meaning that you messed something up.
- Name
5xx- Description
A 5xx status code indicates a server error, meaning that we messed something up (highly unlikely).
Error types
Whenever a request is unsuccessful, the Bazoom Client API will return an error response with an error message, that describes what went wrong with the request.
The unsuccessful responses all return a standardized response format, so you can easily build out your integration to handle them all.
- Name
message- Type
- string
- Description
An overview of the error.
- Name
errors- Type
- object
- Description
A detailed description of fields that failed validation. This property is only present on requests with parameters and/or body data.
- Name
propertyName- Type
- array of string
- Description
Dynamic properties where
propertyNameis the name of the input field that failed valdiation. Value is an array of error messages for the field.
Error response
{
"message": "The niche is not valid.",
"errors": {
"niche": [
"The niche is not valid."
]
}
}