Skip to content

Node-level error branches: let a flow handle a failed node instead of aborting the run #3863

Description

@os-zhuang

Status: design placeholder / engine-level feature. Filed to capture the motivation, not scheduled.

Today

A node that returns { success: false } fails the entire run. AutomationEngine.execute catches it, writes the run-history row, and returns { success: false, error }. The only recovery available is flow-level errorHandling.strategy: 'retry', which re-runs the whole flow from the start — useless when the failure is deterministic (a bad filter, a validation rejection, a 4xx from an http node).

There is no way to say "if this node fails, take this other path."

Why it matters now

Guardrails that refuse to execute are the platform's main defense against silently-wrong data operations, and we keep (correctly) adding them:

Every one of them makes a node fail hard, and every one therefore aborts the run. That is the right default — a widened delete_record must not proceed — but it means the only available response to a guard is "the whole automation stops." The strictness debate on #3810 was really a debate about this: the objection was never "the guard is wrong," it was "aborting is expensive." An error branch decouples the two.

It also generalizes well past guards. A get_record that finds nothing, an http node that 404s, a connector_action that rate-limits — all are ordinary business conditions an author would like to route around, and today each one kills the run.

Sketch

An out-edge with an error semantic, resolved when the source node fails:

edges: [
  { source: 'fetch_account', target: 'use_account', label: 'ok' },
  { source: 'fetch_account', target: 'notify_admin', type: 'error' },
]

Open questions:

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions