Skip to main content
Class Base class for every exception the Crossmint SDK throws.
Every subclass carries a code (CrossmintErrorCode) so consumer code can switch on error categories instead of string-matching on message. The optional cause preserves the original error / payload that triggered this exception — useful for logging and programmatic handling.

Constructors

CrossmintException

Creates a generic CrossmintException. Prefer throwing a subclass scoped to the failure domain (auth / wallet / signer / …).

Properties

message

Human-readable message suitable for logs. Not localized — do not show this directly to end users.

code

A machine-readable error code for programmatic switch/case handling.

cause

The underlying cause — typically a lower-level exception or an API response payload. Inspect this for extra detail when diagnosing errors.

Methods

toString