Skip to main content

Error Handling

The Javascript SDK allows developers to implement custom error handling logic.

Default Behaviour

By default, only some requests will throw. If the response status code is 4xx, then an exception will be thrown. If the response status code is 5xx, then the returned object will contain an error property.

Customise Error Handling


The underlying HTTP request provider is Axios.

Server responded with an error

To change the error handling behaviour, you can replace the error handling function.


customErrorResponseHandler should be an async method.

import { errorHandling } from "";

const customErrorResponseHandler = async (axiosResponse) => {
console.warn(`Server responded: ${axiosResponse.statusText}`);


export const configure = () => {