---
title: Error handling
canonical: https://developer.unico.io/dual-api/developers/sdks-and-tools/web/web-sdk/error-handling
locale: en
generated_by: markdown-export
---

All error handling for the Web SDK is centralized in this section. The `error` callback receives an `ErrorBio` object exposing `getCode()` and `getDescription()`.

## prepareCamera errors

| Code | Description |
|---|---|
| `73000` | Unknown and unexpected error during normal usage of SDK APIs |
| `73001` | `<property>` is required |
| `73002` | `<property>` must be an instance of `<class>` |
| `73003` | `<class>` with name `<name>` is not available to inject |
| `73004` | Class type must be a function or a class |
| `73005` | Could not find the `<locale>` locale |
| `73006` | Could not find text: `<text>` |
| `73100` | Unable to connect to internet |
| `73200` | Could not find the Unico SDK JSON file |
| `73201` | Could not load the Unico SDK JSON file |
| `73202` | Unico SDK JSON file is invalid |
| `73204` | Unable to initialize the SDK — configure the environment via `setEnvironment` on build |
| `73300` | Could not authenticate this application |
| `73301` | Could not authenticate this application |
| `73302` | Authentication token not found |
| `73303` | Current host is not registered |
| `73400` | Could not initialize camera |
| `73401` | Could not load ML models for this camera |
| `73402` | The Key could not be verified due to connectivity issues on the user's device |
| `73403` | This device/platform/browser/version combination is not supported by the SDK |
| `73404` | Device is in landscape display orientation. The SDK can only be used in portrait |
| `73405` | Device blocked due to multiple failed attempts |
| `73406` | Camera initialization was blocked — the SDK was opened in an iFrame during `prepareCamera` |
| `73407` | The SDK was not fully loaded |
| `73500` | Could not get session |
| `73501` | Could not get session |
| `73502` | Session token not found |
| `73600` | Could not find camera resource |
| `73601` | Could not start camera in production mode |
| `74000` | Invalid hexadecimal |
| `74001` | Object is not a `UnicoTheme` |

## openCamera errors

| Code | Description |
|---|---|
| `73700` | Could not parse camera response |
| `73704` | The user pressed the cancel button and did not complete the session |
| `73706` | Camera access denied — user explicitly denied permission or device policy blocks it |
| `73707` | The session was cancelled due to the app being terminated, sleeping, OS notification, or backgrounded |
| `73708` | The session was cancelled because the device is in landscape mode |
| `73710` | The session was cancelled because the user could not complete it within the allotted timeout |
| `73715` | The session was cancelled because not all guidance images were configured |
| `73716` | The session was cancelled because the SDK was unable to start the camera on this device |
| `73717` | The session was cancelled because the user was in a locked-out state |
| `73718` | Unknown and unexpected error during normal usage of SDK APIs |
| `73720` | The developer programmatically called the session cancel API |
| `73721` | The session was cancelled due to a device orientation change during the session |
| `73722` | The session was cancelled because the document is not ready |
| `73723` | The session was cancelled because there was another session in progress |
| `73724` | The active session was cancelled because the camera session started inside an iFrame |
| `73728` | Connection error — please use HTTPS to connect |
| `73729` | Browser not supported — please open in another browser |
| `73730` | Unable to initialize an active liveness session — unknown license error |
| `73731` | Unable to initialize an active liveness session — license expired |
| `73732` | Unable to initialize an active liveness session — origin is not permitted |
| `73750` | The capture failed because the user's eyes were closed |
| `73760` | The capture failed because of the lighting in the environment (too dark, too bright or uneven) |
| `73761` | The capture failed because of the distance between the user's face and the screen (too close or too far) |
| `73762` | The capture failed because glasses or accessories are covering the user's face |
| `73763` | The capture failed because the user's face was not steady or aligned |
| `73764` | The capture failed because of the face framing (face off-center, more than one face or a busy background) |
| `73800` | Could not encrypt response |
| `73900` | Could not get system information |

:::secondary[Official error catalog]
The codes above reflect the Web SDK catalog. The official cross-platform error code catalog is available at [API Reference > Error codes](/dual-api/developers/api-reference/error-codes).
:::

## Handling the callback

```javascript
const callback = {
  on: {
    success: (obj) => {
      console.log(obj.base64);
      console.log(obj.encrypted);
    },
    error: (error) => {
      const code = error.getCode();
      const description = error.getDescription();
      // handle error
    }
  }
};
```

:::danger[Mandatory callback]
The `callback` object is mandatory. If not properly implemented (covering both `success` and `error` events), the SDK raises an exception that, if not handled, is displayed in the user's console.
:::