MessageError class

Annotations
  • @Freezed.new(makeCollectionsUnmodifiable: false)
  • @JsonSerializable.new(explicitToJson: true)

Constructors

MessageError({@Default.new('error') String type, required String code, String? path, @Default.new('plain') String? contentType, required String content, required String severity, Map<String, dynamic>? extra})
const
factory
MessageError.fromJson(Map<String, dynamic> json)
factory

Properties

code → String
Error code. Possible values include: missing, invalid, out_of_stock, payment_declined, requires_sign_in, requires_3ds, requires_identity_linking. Freeform codes also allowed.
no setterinherited
content → String
Human-readable message.
no setterinherited
contentType → String?
Content format, default = plain.
no setterinherited
copyWith → $MessageErrorCopyWith<MessageError>
Create a copy of MessageError with the given fields replaced by the non-null parameter values.
no setterinherited
extra → Map<String, dynamic>?
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
path → String?
RFC 9535 JSONPath to the component the message refers to (e.g., $.items1).
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
severity → String
Declares who resolves this error. 'recoverable': agent can fix via API. 'requires_buyer_input': merchant requires information their API doesn't support collecting programmatically (checkout incomplete). 'requires_buyer_review': buyer must authorize before order placement due to policy, regulatory, or entitlement rules (checkout complete). Errors with 'requires_*' severity contribute to 'status: requires_escalation'.
no setterinherited
type → String
Message type discriminator.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited