SUBREGISTRY_EXISTS
What SUBREGISTRY_EXISTS 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 already has a subregistry; replacing it orphans every subname in it.
What to show users
| Title | Message | Action |
|---|---|---|
| Subnames in place | This name already holds subnames that replacing its registry would remove. |
How to fix
Pass replace: true to replace it anyway.
Retry safety
Retrying the same call fails the same way until the cause is fixed (retryable: false).
Actions that throw it
| Action | When |
|---|---|
registry.attach | when the name already has another subregistry and replace is not set. |
registry.deploy | when attachTo already has a subregistry and replace is not set. |
Catch it
Errors.hasCode("SUBREGISTRY_EXISTS") narrows to this error. See Handle errors.
Was this page helpful?