ErrorEvent class final
Terminal event: the stream failed or was aborted.
Per the providers-never-throw contract, all provider failures arrive here instead of as exceptions.
- Inheritance
-
- Object
- AssistantMessageEvent
- ErrorEvent
Constructors
- ErrorEvent({required StopReason reason, required AssistantMessage error, Duration? retryAfter})
-
const
Properties
- error → AssistantMessage
-
The final message, with AssistantMessage.stopReason set to reason
and AssistantMessage.errorMessage describing the failure.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- partial → AssistantMessage
-
The live partial message as of this event.
no setteroverride
- reason → StopReason
-
Why the stream failed: StopReason.error or StopReason.aborted.
final
- retryAfter → Duration?
-
Provider-suggested delay before retrying, parsed from the
Retry-Afterresponse header on rate-limit (HTTP 429) failures.nullwhen the failure was not an HTTP error or the provider sent no parseable header; callers should then apply their own backoff strategy.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
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited