MicropayError class

Represents an error from the Micropay API.

Implemented types

Constructors

MicropayError({required String code, required String message, int? statusCode, Object? cause})
MicropayError.authentication(String message)
Creates an authentication error.
factory
MicropayError.cancelled()
Creates a cancelled error.
factory
MicropayError.fromJson(Map<String, dynamic> json, {int? statusCode})
Creates a MicropayError from a JSON response.
factory
MicropayError.network(String message, {Object? cause})
Creates a network error.
factory
MicropayError.timeout()
Creates a timeout error.
factory
MicropayError.validation(String message)
Creates a validation error.
factory

Properties

cause → Object?
The original error that caused this exception.
final
code → String
The error code returned by the API.
final
hashCode → int
The hash code for this object.
no setterinherited
isRetryable → bool
Whether this is a retryable error.
no setter
message → String
A human-readable error message.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
statusCode → int?
HTTP status code, if applicable.
final

Methods

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

Operators

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