Skip to content

An error edge replaces the node's output with an error envelope

The envelope is the whole contract between a failing node and its handler: a handler can be written against it without knowing which node type failed.

The rule

Normative: this is the rule
  1. Where a node produces an error output and has at least one error edge, its unit of work MUST be recorded as failed.
  2. That unit of work MUST also be marked as error-routed.
  3. The node's outputs MUST be replaced by {"error": {"message", "code", "node_id", "retryable"}}.
  4. The run MUST continue.
  5. The envelope MUST carry an additional details key when the failure supplied structured detail, and MUST NOT carry it otherwise.

What it means

The envelope does not sit alongside the node's own output — it replaces it. Whatever the node would have produced on success is gone; a node downstream of the error edge sees only message, code, node_id and retryable, and can be written against that shape without ever knowing which node type failed or what it would otherwise have returned. The node's own unit of work is still recorded failed, not merely routed as if routing undid the failure — the run continuing is a decision about what happens next, not a change to what happened. details is the one key that is not always there: it appears only when the failure itself supplied something structured, never as an empty placeholder.

Example

A node with a wired error edge fails; a node downstream reads its output.

What arrives in place of the failing node's own outputrouted
{"error": {"message": "boom blew up", "node_id": "boom"}}

Why

Recorded under OPEN-25.

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