NameStateError
What NameStateError means, which codes it carries and how to catch it in ensforge. Lists its fields and every code. Includes how to catch it.
Error class12 codes · @ensforge/sdk
The name is in the wrong state for this operation (registered, expired, locked, …).
Codes
| Code | Meaning | Retryable |
|---|---|---|
NAME_NOT_AVAILABLE | The name is already registered. | No |
NAME_NOT_REGISTERED | The name is not registered. | No |
NAME_RESERVED | The name is reserved. | No |
NAME_EXPIRED | The name has expired. | No |
NAME_NOT_RENEWABLE | The name cannot be renewed. | No |
NAME_LOCKED | The name is locked. | No |
NAME_NOT_WRAPPED | The name is not wrapped in the NameWrapper. | No |
NAME_WRAPPED | The name is already wrapped in the NameWrapper. | No |
NAME_UNREACHABLE | ENSv2 resolution no longer reaches this ENSv1 name. | No |
NAME_REQUIRES_MIGRATION | The name must be migrated to ENSv2 first. | No |
PARENT_NOT_MIGRATED | The parent name has not been migrated to ENSv2. | No |
REGISTRY_NOT_EMANCIPATED | The registry is not emancipated, so this transfer is unsafe. | No |
Catch it
Effect.catchTag("NameStateError", …) or error instanceof Errors.NameStateError. See Handle errors.
Was this page helpful?