Skip to content

Errors

Error classes used by Wagmi.

BaseError

Error class extended by all errors.

ts
import { BaseError } from 'wagmi'

Config

ChainNotConfiguredError

When a chain is not configured. You likely need to add the chain to Config['chains'].

ts
import { ChainNotConfiguredError } from 'wagmi'

ConnectorAccountNotFound

When an account does not exist on the connector or is unable to be used.

ts
import { ConnectorAccountNotFound } from 'wagmi'

ConnectorAlreadyConnectedError

When a connector is already connected.

ts
import { ConnectorAlreadyConnectedError } from 'wagmi'

ConnectorNotConnectedError

When a connector is not connected.

ts
import { ConnectorNotConnectedError } from 'wagmi'

ConnectorNotFoundError

When a connector is not found or able to be used.

ts
import { ConnectorNotFoundError } from 'wagmi'

Connector

ProviderNotFoundError

When a connector's provider is not found or able to be used.

ts
import { ProviderNotFoundError } from 'wagmi'

SwitchChainNotSupportedError

When switching chains is not supported by connectors.

ts
import { SwitchChainNotSupportedError } from 'wagmi'

React

WagmiProviderNotFoundError

When a Wagmi hook is used outside of a WagmiProvider.

ts
import { WagmiProviderNotFoundError } from 'wagmi'

Released under the MIT License.