GatewayError class

Structured error from the gateway-handoff layer.

Distinct from ReaderError because the gateway is a distinct architectural layer (the SDK is not the gateway; this error describes what happened between the SDK and the gateway, never what the gateway itself decided). The POS surfaces GatewayHandoffResponse.status for the gateway's own answer.

Implemented types

Constructors

GatewayError({required GatewayErrorCode code, required String message, int? httpStatus, int? attempt, bool recoverable = false})
const
GatewayError.fromJson(Map<String, dynamic> json)
factory

Properties

attempt → int?
1-based attempt number this error was raised on. Useful for telemetry; null when the error fired before any transport attempt.
final
code → GatewayErrorCode
Stable code.
final
hashCode → int
The hash code for this object.
no setterinherited
httpStatus → int?
HTTP status, when this error wraps a backend response.
final
message → String
Human-readable message suitable for logs. MUST NOT include encrypted payload bytes, KSN, bearer tokens, API keys, or any other credential material. The toString form is constrained to the same allow-list.
final
recoverable → bool
Whether the same request can be safely retried. Honored by the SDK's own retry loop (only transient failures retry); the POS may also use it.
final
runtimeType → Type
A representation of the runtime type of the object.
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.
override

Operators

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