MyCover AI
Getting Started

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

StatusCodeTypeMeaning
200OKEverything works fine, as expected.
400Bad RequestYour request was unacceptable because a parameter was missing.
401UnauthorisedYou did not provide a valid API key.
402Request FailedYour parameters were valid but the request failed.
403ForbiddenYour API key doesn't give you the permissions to perform a request.
404Not FoundThe resource you requested does not exist.
429Too Many RequestsYou have sent too many requests in a given amount of time.
500, 502, 503, 504Internal Server ErrorsSomething went wrong on our end. (These are usually rare)

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:

error
{
    "responseCode": 0,
    "responseText": "An error occurred while creating policy",
    "path": "/v1/products/leadway/buy-third-party"
}
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 .