INVALID_COIN_TYPE
What INVALID_COIN_TYPE means, why InvalidInputError throws it, what to show users and how to fix it in ensforge. Also covers retry safety.
InvalidInputErrorNot retryable
@ensforge/sdk
What happened
undefined is not a known coin type.
What to show users
| Title | Message | Action |
|---|---|---|
| Unsupported network | This coin or network is not supported. |
How to fix
Pass a symbol (btc), { chainId } or a numeric coin type.
Retry safety
Retrying the same call fails the same way until the cause is fixed (retryable: false).
Actions that throw it
| Action | When |
|---|---|
indexer.getNamesForAddress | for invalid input. |
indexer.getPrimaryName | for invalid input. |
permission.check | for invalid input. |
primaryName.get | for invalid input, or with strict an unnormalized name. |
primaryName.set | for a coin that is not an EVM chain, or a chain the claim does not cover. |
primaryName.signClaim | when chainIds is empty, includes the ENS chain, or mixes mainnet L2s and testnets. |
record.get | for invalid input. |
record.getAddress | for invalid input. |
record.set | for invalid input. |
Catch it
Errors.hasCode("INVALID_COIN_TYPE") narrows to this error. See Handle errors.
Was this page helpful?