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

UnauthorizedError

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.

Error class8 codes · @ensforge/sdk

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

Fields

FieldTypeDescription
accountAddress
missingRolesreadonly string[]Role names the account lacks (MISSING_ROLES), decoded when the contract kind is known.
roleBitmapbigintRaw role bitmap from the revert.
requirementsreadonly UnauthorizedError.Requirement[]What the account lacks, or what blocks the change, from permission.check.

Codes

CodeMeaningRetryable
NOT_OWNERThe account does not own this name.No
MISSING_ROLESThe account is missing the roles this change needs.No
CANNOT_GRANT_ROLESThe account cannot grant or revoke these roles.No
NOT_APPROVEDThe account is not approved to manage this name.No
FUSE_BURNEDA burned NameWrapper fuse forbids this change.No
TRANSFER_DISALLOWEDThis name cannot be transferred right now.No
SIGNATURE_INVALIDThe signature does not authorize this change.No
SIGNATURE_EXPIREDThe signature has expired.No

Catch it

Effect.catchTag("UnauthorizedError", …) or error instanceof Errors.UnauthorizedError. See Handle errors.

Was this page helpful?