NmApiException class
An API error ({error: {code, message, details, requestId}}) or a network failure (NETWORK_ERROR, TIMEOUT).
- Implemented types
Constructors
Properties
- code → String
-
Machine-readable code, e.g.
VALIDATION_ERROR, orHTTP_<status>when the body had none.final -
details
→ List<
Map< String, dynamic> > -
error.details.final - hashCode → int
-
The hash code for this object.
no setterinherited
- isNetwork → bool
-
A network failure or timeout.
no setter
- message → String
-
Human-readable message.
final
- requestId → String?
-
Request id from the body or the
x-request-idheader.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode → int?
-
HTTP status; null for network failures.
final
Methods
-
detail(
String key) → Object? -
The first value of
keyin details. -
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