# MISSING_ROLES

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

What MISSING_ROLES means, why UnauthorizedError throws it, what to show users and how to fix it in ensforge. Also covers retry safety.

Source: https://ensforge.com/docs/reference/errors/MISSING_ROLES

<ErrorMeta errorClass="UnauthorizedError" href="/docs/reference/errors/unauthorized-error" package="@ensforge/sdk" />

## What happened [#what-happened]

The account is missing the roles this change needs.

## What to show users [#what-to-show-users]

| Title | Message | Action |
| --- | --- | --- |
| Permission needed | Your account is not allowed to make this change to this name. | Ask the owner for permission. |

## How to fix [#how-to-fix]

Ask the name's owner to grant the roles, or send from the owner's account.

## Retry safety [#retry-safety]

Retrying the same call fails the same way until the cause is fixed (`retryable: false`).

## Actions that throw it [#actions-that-throw-it]

| Action | When |
| --- | --- |
| [`record.set`](/docs/reference/sdk/record/set) | when the account may not edit records. |
| [`registry.attach`](/docs/reference/sdk/registry/attach) | when the account may not change it. |
| [`registry.deploy`](/docs/reference/sdk/registry/deploy) | when the account may not set the name's subregistry. |
| [`registry.setUri`](/docs/reference/sdk/registry/set-uri) | without the `setUri` root role. |
| [`registry.upgrade`](/docs/reference/sdk/registry/upgrade) | without the `upgrade` root role. |
| [`resolver.create`](/docs/reference/sdk/resolver/create) | when the account may not point the name at it. |
| [`resolver.link`](/docs/reference/sdk/resolver/link) | without the `link` role. |
| [`resolver.set`](/docs/reference/sdk/resolver/set) | when the account may not change it. |
| [`resolver.upgrade`](/docs/reference/sdk/resolver/upgrade) | without the `upgrade` role. |
| [`subname.create`](/docs/reference/sdk/subname/create) | when the account may not create children. |
| [`subname.remove`](/docs/reference/sdk/subname/remove) | when the account may not remove it. |
| [`subname.update`](/docs/reference/sdk/subname/update) | when the account may not change it. |

## Catch it [#catch-it]

`Errors.hasCode("MISSING_ROLES")` narrows to this error. See [Handle errors](/docs/sdk/handle-errors).