Skip to main content

Errors

Every transport rejects with ZuniaConnectError and a stable code. window.zunia uses the wallet's codes from this list: USER_REJECTED to INVALID_PARAMS, and INTERNAL.

CodeMeaning
USER_REJECTEDThe user said no, or closed the window.
NOT_CONNECTEDThis origin has no grant for that chain or account.
LOCKEDThe wallet is locked.
UNKNOWN_CHAINThe wallet does not know the chain. Suggest it first.
ORIGIN_MISMATCHA sign-in message names another site.
UNSUPPORTEDThe wallet or transport cannot do this (sendTx, unknown methods, blind signing of unknown messages).
INVALID_PARAMSBad arguments.
NOT_INSTALLEDNo extension, relay or WalletConnect setup.
TIMEOUTThe wallet did not answer in time.
DISCONNECTEDThe session ended while waiting.
PAIRING_FAILEDQR pairing could not complete.
SESSION_EXPIREDThe relay no longer knows the session.
NETWORKThe relay or WalletConnect could not be reached.
INTERNALAnything else.

error instanceof ZuniaConnectError and error.code are the stable checks. Do not match on error.message.

error.reason narrows the cases where the next step differs:

ReasonCodeMeaning
blind-signingUNSUPPORTEDThis Zunia build cannot show the transaction, so it signed nothing.
amino-escapingUNSUPPORTEDZunia 0.1.4 or older signed &, < or > in a way the chain refuses. Stopped before broadcast.
prompt-expiredTIMEOUTThe extension's prompt expired before anyone answered.
stale-pageDISCONNECTEDThe extension was updated or reloaded under the page. Reload the page.

explainZuniaError(error) turns any error into a short title, a message with the next step, retryable, and the wallet's own text as detail.

Sign-in (ZuniaSignInError)​

Thrown by verifySignIn on the server:

INVALID_MESSAGE, DOMAIN_MISMATCH, URI_MISMATCH, NONCE_MISMATCH, CHAIN_MISMATCH, ADDRESS_MISMATCH, ISSUED_IN_FUTURE, TOO_OLD, EXPIRED, NOT_YET_VALID, UNSUPPORTED_KEY, KEY_MISMATCH, INVALID_SIGNATURE.