RecoverableToolError
Thrown by a tool’s execute (or a guard wrapping it) when the call failed for a
reason the model can correct: a referent that does not exist (“Unknown unit ‘12B’”),
a value out of range, a missing precondition the user can supply. Distinct from a
fatal fault (network down, schema broken) in that the model should see the message
and retry — not be told “something went wrong on my side”.
On the model path it is returned to the model as a tool result (the model self-corrects).
On the flow path it is the signal to re-collect the offending input instead of
degrading the flow — see runFlow. Detected by type (isRecoverableToolError), never
by string-matching the message.
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new RecoverableToolError(message, options?): RecoverableToolError;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
{ |
|
|
|
Returns
Section titled “Returns”RecoverableToolError
Overrides
Section titled “Overrides”Error.constructorProperties
Section titled “Properties”userMessage?
Section titled “userMessage?”readonly optional userMessage?: string;Author-written copy shown to the USER, verbatim, when a flow re-asks after this
error. message is for the model; a business rejection (“that unit already has
an open work order”) is useless to the person unless someone tells them, and the
collect node’s ask is deterministic precisely so the model cannot rephrase it.