TurnFailure class

Thrown by LoopDriver.runTurn when a turn fails for a reason that counts toward a failure budget (PRD §17).

reason is one of:

  • 'invalid_action_exhausted' — validator rejected three times; counts toward consecutive-failed-turns.
  • 'schema_exhausted' — provider raised SchemaRejection twice; counts toward consecutive-failed-turns.
  • 'turn_timeout' — per-turn 120s budget expired; counts toward the separate consecutive-turn-timeouts counter.
  • 'provider_transport' — the model response failed at the transport level (ClientException / SocketException / HttpException / TimeoutException); counts toward consecutive-failed-turns and the turn is retried after a short backoff.
Implemented types
Annotations
  • @immutable

Constructors

TurnFailure(int turnIndex, String reason, [Object? cause])
const

Properties

cause Object?
final
hashCode int
The hash code for this object.
no setterinherited
reason String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
turnIndex int
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