Skip to content

An error edge routes a failure instead of raising it

The rule

Normative: this is the rule
  1. An edge whose source handle ends with -output-error is an error edge.
  2. When a node that has one produces an error output (ERR-1), the failure MUST be routed rather than raised.
  3. A failure that escapes the node is not routed (ERR-3).
  4. The node's job MUST be recorded as failed and marked as having been routed.
  5. The node MUST yield an error payload that carries message, code, node_id and retryable.
  6. The run MUST continue along the error edge.

What it means

A failing step whose failure has somewhere to go does not raise it: the run continues down the error wire instead, carrying a payload built for that purpose rather than the step's own output. The step is still recorded as having failed — routing a failure is not the same outcome as the step succeeding — but that failure is marked as having been routed, so a resume does not treat it as the kind of failure that stops the run.

Example

A step named boom fails, and carries one outgoing wire from its error output:

The wire out of the failing step's error outputdeclared
{ "source": "boom", "source_handle": "boom-output-error", "target": "handler", "target_handle": "handler-input-input" }
The message in the error payload the run carries onwardrouted
"boom blew up"

The payload's node_id is boom; the step's job is recorded as failed and marked as routed, never as completed.

Without that wire, the same failure is never routed: it stops the run instead.

Why

Recorded under OPEN-22, OPEN-25, OPEN-45.

Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0 · EDGE-6 · changed in spec 1.0