Skip to Content
On this page

Errors the DogeOS SDK throws or passes on, as of @dogeos/dogeos-sdk 4.0.7. To handle them in your app, see Handle Wallet Errors.

Wallet Error Codes#

Wallet errors carry a numeric code. Check them with isWalletError(error, code).

CodeWalletErrorCodeMeaning
4001UserRejectedThe user rejected the request, or closed the connect modal without connecting
4100UnauthorizedThe dApp isn’t authorized for this account or method
4200UnsupportedMethodThe wallet doesn’t support the method
4900DisconnectedNo wallet is connected, or the wallet disconnected before the request finished
4901ChainDisconnectedThe wallet isn’t connected to the requested chain family
4902UnsupportedChainThe wallet doesn’t know the chain
-32602Invalid parameters. In MyDoge: the chain ID doesn’t match the active network
-32603Internal error. In MyDoge 3.1.1 and later: a transaction failed after the user approved it
-1In MyDoge: a generic error with the message Unknown. For a network switch, it means cancelled or not supported; it also covers failed read calls and malformed requests

Inside MyDoge, cancelling a network switch rejects with -1, not 4001.

Connection Messages#

MessageCodeCause
The connect modal was closed before a wallet connected.4001useWalletHost().connect() in a browser, when the user closes the modal
MyDoge cannot connect <chainType> accounts here.4901useWalletHost().connect() inside MyDoge with a chain family MyDoge doesn’t offer
MyDoge did not offer a wallet to connect. Reload the page and try again.4900useWalletHost().connect() inside MyDoge when no MyDoge wallet is available
The wallet provider was unmounted.4900WalletConnectProvider unmounted while a connection was pending
The wallet was disconnected before the connection finished.4900Inside MyDoge, a disconnect overtook a pending connection
Wallet disconnected before request started4900Inside MyDoge, a queued request was cancelled by a disconnect
Wallet is already connecteduseWalletConnect().connect() with the same wallet and chain family already connected
Wallet connection did not return an addressThe wallet connected without returning an account
Provider not available for this chain typeuseWalletConnect().connect() for a chain family the wallet doesn’t support
Wallet is performing an action, please wait...A wallet action started while another was still running
WalletConnect requires config.walletConnectProjectId.WalletConnect was chosen without a project ID
Unable to connect the authenticated DogeOS wallet.The signed-in DogeOS account has no wallet the SDK could connect

Account Action Messages#

MessageCause
Wallet not connectedsignMessage() or signInWithWallet() with no wallet connected
Message is requiredsignMessage() with an empty message
Invalid chain IDswitchChain() with a chainInfo.id the SDK can’t read
Sign-in chain ID does not match the connected walletsignInWithWallet() with a chainId other than the connected chain
Sign-in address does not match the connected walletsignInWithWallet() with an address other than the connected account
A valid connected EVM chain ID is requiredsignInWithWallet() on EVM when the connected chain ID can’t be read
switchChain Not supported in <chainType>switchChain() with chainType set to Solana or Dogecoin
Failed to sign insignInWithWallet() failed without a more specific error

Sign-In Messages#

MessageCodeCause
Authentication popup was blocked.temporarily_unavailableuseDogeOSAuth().login() or reauthenticate() was called outside a click handler
A DogeOSHostErrorunavailable_in_native_hostuseDogeOSAuth().login() or reauthenticate() inside MyDoge

Sign-in errors from useDogeOSAuth() are Error objects with a string code. The type of code isn’t exported; get it from the auth state:

import type { DogeOSAuthFacade } from "@dogeos/dogeos-sdk" type AuthErrorCode = Extract<DogeOSAuthFacade["state"], { kind: "error" }>["error"]["code"]

Configuration and Setup Messages#

MessageCause
config.clientId is required.clientId is missing or blank
config.<field> is SDK-owned and cannot be overridden by consumers.The config sets services or authClient, which the SDK manages
<hook> must be used within WalletConnectProviderA hook ran in a component outside WalletConnectProvider
Failed to fetch chains: <status>getChains() couldn’t reach the chain list
Invalid chains API responsegetChains() received an unreadable chain list
Web3 Assets returned no chain configuration.getChains() received an empty chain list

getMyDogeDappLink() and getDappHref() throw a TypeError:

MessageCause
Expected an absolute https URL for a MyDoge dApp link, got "<url>"The target isn’t a valid absolute URL
Expected an absolute https URL without credentials for a MyDoge dApp link, got "<url>"The target isn’t https, or contains a username or password
MyDoge dApp link targets must be at most 8192 bytesThe target is longer than 8 KiB

Startup Messages#

WalletConnectProvider shows these in place of its children:

TextWhen
Preparing wallet connection…While the SDK starts, inside MyDoge and in mobile browsers until the page has loaded
MyDoge is not ready to connect. Retry, or close and reopen this dApp.Inside MyDoge, when the wallet isn’t ready after 5 seconds; shown with Retry
Wallet connection is not ready. Retry after the page finishes loading.In a mobile browser, when the page hasn’t loaded after 5 seconds; shown with Retry

See Troubleshooting for fixes.