Errors

Some things don't just go as planned, eh. Here's how to manage them.

We use the standard HTTPS status codes to indicate the success or failure of all requests made to our APIs.

Following this standard:

  • 2xx codes indicate success.

  • 4xx codes indicates that an error failed due to the information provided.

  • 5xx codes are related to server problems on our end, though less likely to occur.

To enhance your user experience, we've provided details of the potential errors you may encounter when using our API, along with their meanings.

API Error Codes

Error Handling

For errors in the 4xx range, we provide context through the error responses. The response from the API will include a JSON payload with application and human-readable descriptions about the error. Always parse and utilise this information to troubleshoot and resolve issues effectively.

A typical request response from our API is structured like:

For errors
{
    "responseCode": 0,
    "responseText": "An error occurred while creating policy",
    "path": "/v1/products/leadway/buy-third-party"
}
For success
{
    "responseCode": 1,
    "responseText": "[Success message]",
    "data": {}
}

If you require assistance with integrations or have any questions, we’re happy to help. You can reach out to us through email.

Last updated