Skip to content

Error handler

An Error handler step sits on the error path of a step that can fail. It tells a team, opens a case, or runs a workflow that undoes what was done. Then it carries on, sends the run back to try the failed step again, or ends the run. Details of the failure are in data.error.

  • A payment tool fails: tell the finance team and retry once.
  • A policy was created but the premium collection failed: run an undo workflow to cancel the policy.
  • A courier booking fails: open a case for the logistics desk and end the run.
  • You want the run to wait until a team fixes the problem. Use Escalation on the error path.
  • The step can retry by itself. Use the step’s own Retries setting first, for example on MCP tool.
Setting What it does
Action Required. notify (default), compensate, escalate or none.
Notification template For Notify. Required.
Notify For Notify. Team addresses or roles.
Escalate to For Escalate. Required. The team that gets a case.
Undo with workflow For Compensate. Required. A published workflow that reverses what was done.
Then continue (default) goes on to the next step. retry goes back to the failed step. end ends the run.
Retries For Retry. 1 to 5. Default: 1.
End with outcome For End. Default: failed.
  • A single Next.
  • data.error, set when the step failed: nodeId, label, message and at.

How each action works:

  • Notify sends the template to the team, with the error details.
  • Escalate opens a high-priority case for the team and does not wait for it.
  • Compensate runs the undo workflow with the run’s input, data and the error, and waits for it. If the undo workflow fails, that is recorded in the timeline and the handler carries on.

With Then set to retry, once the retries are used up the handler continues to its next step. With end, the run ends with your outcome and the result failed.

An insurer undoes a policy when premium collection fails.

MCP tool (create policy) → MCP tool (collect premium)
error → Error handler (compensate with "cancel policy", then end, outcome payment_failed)

data.error:

{ "nodeId": "collect_premium", "label": "Collect premium", "message": "Card declined", "at": "2026-12-01T10:15:02+00:00" }