Documentation for agents: an index at /llms.txt, every docs page in one file at /llms-full.txt, and Markdown for any docs page by adding .md to its URL.

Skip to Content
ensforge

MISSING_ROLES

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

UnauthorizedErrorNot retryable
@ensforge/sdk

What happened

The account is missing the roles this change needs.

What to show users

TitleMessageAction
Permission neededYour account is not allowed to make this change to this name.Ask the owner for permission.

How to fix

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

Retry safety

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

Actions that throw it

ActionWhen
record.setwhen the account may not edit records.
registry.attachwhen the account may not change it.
registry.deploywhen the account may not set the name's subregistry.
registry.setUriwithout the setUri root role.
registry.upgradewithout the upgrade root role.
resolver.createwhen the account may not point the name at it.
resolver.linkwithout the link role.
resolver.setwhen the account may not change it.
resolver.upgradewithout the upgrade role.
subname.createwhen the account may not create children.
subname.removewhen the account may not remove it.
subname.updatewhen the account may not change it.

Catch it

Errors.hasCode("MISSING_ROLES") narrows to this error. See Handle errors.

Was this page helpful?