APICallError class
Provider API call failed (AI SDK APICallError analogue) — every
HTTP-shaped failure. status is the classification (401 auth, 404 model,
429 rate limit + retryMs); -1 means no HTTP response was ever observed
— a missing API key, an error built without a request, or a transport
failure. Read retryable to decide on a retry; status cannot tell those
two apart.
- Inheritance
-
- Object
- AimuxException
- APICallError
Constructors
Properties
- code → int
-
Machine-readable error code (AimuxErrorCode constants).
finalinherited
- codeName → String
-
Core
error_type()name for code.no setterinherited - data → dynamic
-
Parsed provider error data (the AI SDK's
APICallError.data), decoded JSON.final - hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
Human-readable failure text.
finalinherited
- providerCode → String?
-
The provider's own error code, e.g.
insufficient_quota.final - providerMessage → String?
-
The failure's own text without the composed prefix message carries,
e.g.
slow down.final - requestBodyValues → dynamic
-
Sanitized request body values (decoded JSON; any JSON type).
final
- responseBody → String?
-
Raw response body.
final
-
responseHeaders
→ Map<
String, String> ? -
Sanitized response headers. (Request ids live here, not on a field:
the core no longer captures a distinct one.)
final
- retryable → bool
-
Whether retrying may help — the
AiMuxErrorverdict, carried across the C ABI. Not derivable from status: a transport failure (request went out, connection reset) and a missing API key (request never went out) both reportstatus == -1and disagree here.finalinherited - retryMs → int
-
Rate-limit hint in ms;
-1if none;0means retry immediately.finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → int
-
HTTP status when known; otherwise
-1.finalinherited - url → String?
-
Sanitized request URL.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited