NAME_HAS_SUBNAMES
What NAME_HAS_SUBNAMES means, why NameStateError throws it, what to show users and how to fix it in ensforge. Also covers retry safety.
NameStateErrorNot retryable
@ensforge/sdk
What happened
The name has subnames, which would keep resolving without it.
What to show users
| Title | Message | Action |
|---|---|---|
| Name has subnames | This name has subnames, which would keep resolving without it. | Remove its subnames first. |
How to fix
Remove its subnames first, or pass allowOrphanedSubnames: true.
Retry safety
Retrying the same call fails the same way until the cause is fixed (retryable: false).
Actions that throw it
| Action | When |
|---|---|
subname.remove | when the indexer knows subnames of an ENSv1 child, unless allowOrphanedSubnames. |
Catch it
Errors.hasCode("NAME_HAS_SUBNAMES") narrows to this error. See Handle errors.
Was this page helpful?