# Web SDK: Errors

Every error the SDK raises is a `SonaError`: `code` says what went wrong, `fix` what to do. `create()` and `ready` reject with one; `add()` throws one only past `maxAvatars`.

## SonaError

The error class. Its `message` and `fix` are plain words for a person; `code` is one of the values below.

| Field | Type | Meaning |
|---|---|---|
| `code` | `'unsupported' \| 'not_ready' \| 'origin' \| 'licence' \| 'app' \| 'gate' \| 'manifest' \| 'context' \| 'readback' \| 'limit' \| 'destroyed' \| 'item' \| 'not_found'` | unsupported: no WebGPU or WebGL2 (or no WebGPU when renderer "webgpu" was asked for). not_ready: a headless picture's avatar was not ready in time. origin: this page's origin is not registered for the app. licence: the app has not accepted the SDK Licence. app: no such app, or it was turned off. gate: 360sona could not be reached. manifest: that avatar could not be read or built. context: the graphics context failed. readback: a picture could not be read. limit: too many avatars or requests. destroyed: the scene or avatar is gone. item: a custom item file was refused (the message names the rule). not_found: no such award, or none this player has earned (the award calls). Read only. |
| `fix` (optional) | `string` | What to do about it, in plain words. Read only. |
