Skip to main content

Overview

Smart Account Kit uses typed error classes that extend SmartAccountError. Catch them specifically to give users clear, actionable feedback.

Error Classes

Usage

Catching specific errors

Using error codes

Each error class carries an errorCode property:

wrapError utility

Wrap unknown caught values into SmartAccountError:

WebAuthn Cancellation

WebAuthnError is thrown when the user dismisses the passkey prompt or the browser rejects the WebAuthn ceremony. Always handle it gracefully - it’s expected user behaviour, not a bug: