Errors

Qover uses HTTP response status codes to indicate the result of the requested operation.

As a general rule of thumb, the following applies:

  • 2xx : Successfull operation.
  • 3xx : Your request result can be found somewhere else.
  • 4xx : Something went wrong with your request. In most cases, you can correct and retry.
  • 5xx : Something went wrong on our side. We will do our best to correct this.

Error with status 3xx

In most cases, a response with a 3xx HTTP status includes a Location header with the url where the result can be found.

Error with status 4xx

In most case 4xx can be one of the following:

401 : Unauthorized

This response does not have a body but only the status unauthorized.

This error is raised when the Authentication is missing or failed

Example

the api key has expired or is invalid.

402 : Payment Required Failed Request

By international design, the default HTTP error for status 402 is 'Payment Required' but it has never been officially released and can be seen as a sort of functional error. Qover uses this error code, like many other APIs for a Failed Request.

Example

These errors can be triggered when the payload submitted to the API is valid but the action behind breaks a functional rule.

{
  "code": "functional_error",
  "errorId": "ae43adf7-3619-437d-bc67-e00c49637da0",
  "rules": [
    {
      "code": "SENDING_LEAD_REQUIRES_DRAFT_POLICYHOLDER_VALID_EMAIL_AND_FIRSTNAME"
    }
  ]
}

403: Forbidden

This response does not have a body but only the status Forbidden. It happens when the api key used does not have the authority to perform an action.

Example

Trying to access a Gap Draft which an api key that has no view right on the Draft will trigger an UnAuthorized

400: Bad Request

These errors are raised when the request body/payload does not comply with the expected structure.

When possible the returned error will include the fields that do not comply with the expected message.

Example

{
    "code": "validation_error",
    "errorId": "ae43adf7-3619-437d-bc67-e00c49637da0",
    "parameters": [
      {
        "name": "partner.productAgreementLabel",
        "code": "mandatory_field"
      },
      {
        "name": "risk.drivers[1].birthDate",
        "code": "out_of_range"
      }
]
}