Skip to main content
Final Class Thrown when a JSON payload from the Crossmint API is missing a required field, contains the wrong type for a field, or otherwise cannot be parsed into a typed model. Carries the entity being parsed and the offending field so consumer code can react programmatically instead of pattern matching on the message string.
final class CrossmintDeserializationException extends CrossmintException

Constructors

CrossmintDeserializationException

const CrossmintDeserializationException(
  super.message, {
  this.entity,
  this.field,
  super.cause,
})
Creates a deserialization exception. Always carries CrossmintErrorCode.deserializationError.

Properties

entity

final String? entity
The name of the model type being parsed (e.g. "CrossmintWallet").

field

final String? field
The name of the field that failed to parse.