# UnauthorizedError

> For the complete documentation index, see [llms.txt](https://ensforge.com/llms.txt).

What UnauthorizedError means, which codes it carries and how to catch it in ensforge. Lists its fields and every code. Includes how to catch it.

Source: https://ensforge.com/docs/reference/errors/unauthorized-error

<ApiMeta kind="Error class" summary="8 codes · @ensforge/sdk" source="packages/sdk/src/errors/classes/UnauthorizedError.ts#L60" />

The account lacks ownership, approval or roles for this change, or the signature that should
authorize it is invalid or expired.

## Fields [#fields]

| Field | Type | Description |
| --- | --- | --- |
| `account` | `Address` |  |
| `missingRoles` | `readonly string[]` | Role names the account lacks ([`MISSING_ROLES`](/docs/reference/errors/MISSING_ROLES)), decoded when the contract kind is known. |
| `roleBitmap` | `bigint` | Raw role bitmap from the revert. |
| `requirements` | `readonly UnauthorizedError.Requirement[]` | What the account lacks, or what blocks the change, from `permission.check`. |

## Codes [#codes]

| Code | Meaning | Retryable |
| --- | --- | --- |
| [`NOT_OWNER`](/docs/reference/errors/NOT_OWNER) | The account does not own this name. | No |
| [`MISSING_ROLES`](/docs/reference/errors/MISSING_ROLES) | The account is missing the roles this change needs. | No |
| [`CANNOT_GRANT_ROLES`](/docs/reference/errors/CANNOT_GRANT_ROLES) | The account cannot grant or revoke these roles. | No |
| [`NOT_APPROVED`](/docs/reference/errors/NOT_APPROVED) | The account is not approved to manage this name. | No |
| [`FUSE_BURNED`](/docs/reference/errors/FUSE_BURNED) | A burned NameWrapper fuse forbids this change. | No |
| [`TRANSFER_DISALLOWED`](/docs/reference/errors/TRANSFER_DISALLOWED) | This name cannot be transferred right now. | No |
| [`SIGNATURE_INVALID`](/docs/reference/errors/SIGNATURE_INVALID) | The signature does not authorize this change. | No |
| [`SIGNATURE_EXPIRED`](/docs/reference/errors/SIGNATURE_EXPIRED) | The signature has expired. | No |

## Catch it [#catch-it]

`Effect.catchTag("UnauthorizedError", …)` or `error instanceof Errors.UnauthorizedError`. See [Handle errors](/docs/sdk/handle-errors).