# Errors

ComplyCube uses standard HTTP response codes to indicate the success or failure of an API request.

Codes in the `2xx` range indicate success. Codes in the `4xx` range indicate an error that failed given the information provided. Codes in the `5xx` range indicate an error with ComplyCube's servers.

Some `4xx` errors include an [error code](#example-of-standard-errors) that briefly explains why the error occurred.

## HTTP response codes

<table><thead><tr><th width="329.53515625">Code</th><th>Description</th></tr></thead><tbody><tr><td><code>200</code> </td><td>Everything worked as expected.</td></tr><tr><td><code>204</code></td><td>The resource is deleted.</td></tr><tr><td><code>400</code></td><td>The request has missing arguments or is malformed. See an <a href="#bad-request">example</a> of this type of error.</td></tr><tr><td><code>401</code></td><td>The request is not authenticated. See an <a href="#unauthorized">example</a> of this type of error.</td></tr><tr><td><code>402</code></td><td>The request is not available as payment is due. This is only returned for users on our credit-based plans.</td></tr><tr><td><code>403</code></td><td>The request is authenticated but does not have sufficient permissions. See an <a href="#forbidden">example</a> of this type of error.</td></tr><tr><td><code>404</code></td><td>The resource requested does not exist.</td></tr><tr><td><code>413</code></td><td>The request is too large.</td></tr><tr><td><code>422</code></td><td>A <a href="#processing-errors">processing error</a> has occurred.</td></tr><tr><td><code>429</code></td><td>The <a href="rate-limits">rate limit</a> or <a href="service-quota">service quota</a> has been breached.</td></tr><tr><td><code>500</code></td><td>Something is wrong on our end. Subscribe to our <a href="https://status.complycube.com">status page</a> to be notified of any incident.</td></tr></tbody></table>

## Processing Errors

<table><thead><tr><th width="329.55078125">Error</th><th>Description</th></tr></thead><tbody><tr><td><code>two_sides_expected</code></td><td><p>Returned when only one side of a supported <a href="https://docs.complycube.com/documentation/checks/document-check/document-types-per-country">document type</a> is provided before running a check.</p><p></p><p>Applies to <strong>Document Checks</strong>.</p></td></tr><tr><td><code>unsupported_document_format</code></td><td><p>Returned when an unsupported document attachment format is provided before running a check.</p><p></p><p>Applies to <strong>Document Checks</strong>.</p></td></tr><tr><td><code>unsupported_document_type_country</code></td><td><p>Returned when a check is run against an unsupported <a href="https://docs.complycube.com/documentation/checks/document-check/document-types-per-country">ID type and country combination</a>.</p><p> </p><p>Applies to <strong>Document Checks</strong>.</p></td></tr><tr><td><code>document_requires_issuing_country</code></td><td><p>Returned when a check is run against a document with a missing <code>issuingCountry</code> attribute.</p><p></p><p>Applies to <strong>Document Checks</strong>.</p></td></tr><tr><td><code>document_type_undetected</code></td><td><p>Returned when an unsupported <a href="https://docs.complycube.com/documentation/checks/document-check/document-types-per-country">document type</a> is checked. It could also be returned when the image quality is inadequate to recognize the document.</p><p></p><p>Applies to <strong>Document Checks</strong> and eligible <strong>Document uploads</strong>.</p></td></tr><tr><td><code>invalid_check_update</code></td><td>Returned when an update request is made on an unmodifiable check type.<br><br>Only <strong>Standard Screening Checks</strong> and <strong>Extensive Screening Checks</strong> can be updated.</td></tr><tr><td><code>pending_check_unmodifiable</code></td><td>Returned when an update request is made on a check with a status of 'pending'.</td></tr><tr><td><code>image_unreadable</code></td><td><p>Returned when ComplyCube is not able to read data from a document image. This may occur when the image is of low quality or is incorrectly oriented.</p><p></p><p>Applies to <strong>Document Checks</strong> and eligible <strong>Document uploads</strong>.</p></td></tr><tr><td><code>under_exposure</code></td><td><p>Returned when the uploaded document image is too dark. This may occur when the image is underexposed.</p><p></p><p>Applies to eligible <strong>Document uploads</strong>.</p></td></tr><tr><td><code>excessive_glare</code></td><td><p>Returned when the uploaded document image has excessive glare.</p><p></p><p>Applies to eligible <strong>Document uploads</strong>.</p></td></tr><tr><td><code>document_liveness_failed</code></td><td><p>Returned when a document photo is deemed likely as spoofed, i.e., not live. It could also be returned when the image quality is inadequate to establish the liveness.</p><p></p><p>Applies to eligible <strong>Document uploads</strong>.</p></td></tr><tr><td><code>document_photocopy_detected</code></td><td><p>Returned when a document photo is deemed to be a photocopy.</p><p></p><p>Applies to eligible <strong>Document uploads</strong>.</p></td></tr><tr><td><code>invalid_image_format</code></td><td><p>Returned when an invalid image format is provided.</p><p><br>Applies to <strong>Live Photo</strong>, <strong>Identity Checks,</strong> and <strong>Document Checks</strong>.</p></td></tr><tr><td><code>liveness_failed</code></td><td><p>Returned when a live photo is deemed likely as spoofed, i.e., not live. It could also be returned when the image quality is inadequate to establish the liveness.</p><p></p><p>Applies to <strong>Live Photo</strong>.</p></td></tr><tr><td><code>multiple_faces_detected</code></td><td><p>Returned when multiple faces are detected. The client must retake the live photo.</p><p></p><p>Applies to <strong>Live Photo</strong>.</p></td></tr><tr><td><code>no_face_detected</code></td><td><p>Returned when no faces are detected. The client must retake the live photo.</p><p></p><p>Applies to <strong>Live Photo</strong>.</p></td></tr><tr><td><code>face_not_centred</code></td><td><p>Returned when a face is not centered. The client must retake the live photo.</p><p></p><p>Applies to <strong>Live Photo</strong>.</p></td></tr><tr><td><code>facial_features_obstructed</code></td><td><p>Returned when facial features are obstructed. The client must retake the live photo.</p><p></p><p>Applies to <strong>Live Photo</strong>.</p></td></tr><tr><td><code>face_too_small</code></td><td><p>Returned when the face is too small. The client must come closer and retake the live photo.</p><p></p><p>Applies to <strong>Live Photo</strong>.</p></td></tr><tr><td><code>face_too_close</code></td><td><p>Returned when the face is too close. The client must move away from the camera and retake the live photo.</p><p></p><p>Applies to <strong>Live Photo</strong>.</p></td></tr><tr><td><code>face_not_centered</code></td><td><p>Returned when the face is too close to the edge of the photo. The client must center their face and retake the live photo.</p><p></p><p>Applies to <strong>Live Photo</strong>.</p></td></tr><tr><td><code>face_cropped</code></td><td><p>Returned when the face has been cropped. The client must retake the photo with their entire face in the frame.</p><p></p><p>Applies to <strong>Live Photo</strong>.</p></td></tr><tr><td><code>unsupported_poa_document_type</code></td><td><p>Returned when a check is run against an unsupported <a href="https://docs.complycube.com/documentation/checks/proof-of-address-check">proof of address document</a>.</p><p> </p><p>Applies to <strong>Proof of Address Checks</strong>.</p></td></tr><tr><td><code>unsupported_dl_check_document_type</code></td><td><p>Returned when a check is run against an unsupported driving license document.</p><p> </p><p>Applies to <strong>Driving License Checks</strong>.</p></td></tr><tr><td><code>unsupported_country</code></td><td><p>Returned when a check is run against an <a href="https://docs.complycube.com/documentation/checks/multi-bureau-check/service-coverage#list-of-supported-countries">unsupported country</a>.</p><p> </p><p>Applies to <strong>Multi-Bureau Checks</strong>.</p></td></tr><tr><td><code>missing_address_attributes</code></td><td><p>Returned when a check is run while lacking the <a href="https://docs.complycube.com/documentation/checks/multi-bureau-check/service-coverage#list-of-supported-countries">minimum required address attributes</a>.</p><p> </p><p>Applies to <strong>Multi-Bureau Checks</strong>.</p></td></tr><tr><td><code>missing_client_attributes</code></td><td><p>Returned when a check is run while lacking the <a href="https://docs.complycube.com/documentation/checks/multi-bureau-check/service-coverage#list-of-supported-countries">minimum required client attributes</a>.</p><p> </p><p>Applies to <strong>Multi-Bureau Checks</strong>.</p></td></tr><tr><td><code>invalid_id_number_format</code></td><td><p>Returned when a check is run with an <a href="https://docs.complycube.com/documentation/checks/multi-bureau-check/service-coverage#list-of-supported-countries">incorrectly formatted ID Number</a> for a given country (e.g., SSN, Social Insurance Number).</p><p> </p><p>Applies to <strong>Multi-Bureau Checks</strong>.</p></td></tr><tr><td><code>image_too_large</code></td><td><p>Returned when the image provided is too large.</p><p></p><p>Applies to <strong>Document, Live Photo</strong>, <strong>Identity Checks,</strong> and <strong>Document Checks</strong>.</p></td></tr></tbody></table>

## Example of Standard Errors

Below, you will find some example error responses from the ComplyCube API.

### Unauthorized

You'll most likely receive a `401: Unauthorized` response when you provide an invalid API key.

```json
{
    "type": "unauthorized",
    "message": "The 'Authorization' header is invalid"
}
```

### Forbidden

You'll most likely receive a `403: Forbidden` response when you do not have access to the requested resource.

```json
{
    "type": "unauthorized",
    "message": "Your current plan does not include access to this service"
}
```

### Bad Request

You'll get a `400: Bad Request` when you fail validation.

```javascript
{
    "type": "invalid_request",
    "message": "'personDetails' must be provided when client type is `person`",
    "param": "personDetails"
}
```

### Not Found

When a resource is not found, you will get a `404: Not Found` response.

```javascript
{
    "type": "resource_not_found",
    "message": "Invalid client id '123456789'"
}
```

### Rate Limited

You will receive a `429: Too Many Requests` response when you make too many requests.

```javascript
{
  "type": "rate_limit_exceeded",
  "message": "You have exceeded the rate limit prescribed to your plan"
}
```

### Internal Server Error

You'll receive a `500: Internal Server Error` response when something goes wrong on our side.

```javascript
{
  "type": "internal_server_error",
  "message": "An error has occurred, try your request again. If you still keep getting this error, please get in touch with Support."
}
```
