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
| Field | Type | Description |
|---|---|---|
account | Address | |
missingRoles | readonly string[] | Role names the account lacks (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
| Code | Meaning | Retryable |
|---|---|---|
NOT_OWNER | The account does not own this name. | No |
MISSING_ROLES | The account is missing the roles this change needs. | No |
CANNOT_GRANT_ROLES | The account cannot grant or revoke these roles. | No |
NOT_APPROVED | The account is not approved to manage this name. | No |
FUSE_BURNED | A burned NameWrapper fuse forbids this change. | No |
TRANSFER_DISALLOWED | This name cannot be transferred right now. | No |
SIGNATURE_INVALID | The signature does not authorize this change. | No |
SIGNATURE_EXPIRED | The signature has expired. | No |
Catch it
Effect.catchTag("UnauthorizedError", …) or error instanceof Errors.UnauthorizedError. See Handle errors.
Was this page helpful?