# Flow Error

Source: https://openflow.run/en/docs/nodes/error/
Language: en
Product version: 0.1.0-beta.77

Start a separate handler when a selected production workflow fails.

Use Flow Error to send notifications or record incidents after an automatic production Run finally fails. The failed source Run keeps its original outcome.

## Select upstream Flows

Add Flow Error to the handler Flow and choose the published upstream workflows it should monitor. The public configuration is a list of Flow IDs:

```json
{
  "op": "node.add", "as": "failure", "type": "error", "name": "Production failure",
  "config": { "sourceFlowIds": ["UPSTREAM_FLOW_ID"] }
}
```

An empty list listens to no Flows. You cannot select the current Flow, an unpublished Flow, or a deleted Flow. Publish and enable the handler after selecting eligible sources.

Flow Error starts a separate handler Run for a selected production workflow's final failure.

**Input**
Select the published upstream workflows to monitor. The example starts with an empty selection.

**Expected result**
An eligible upstream failure starts this handler; the source Run keeps its failed status.

**Before running**
Select upstream published Flows, then publish and enable this handler. Manual Runs do not produce Flow Error dispatch.

[Download workflow](https://openflow.run/docs/examples/handle-flow-error.openflow.json)

## Failure rules

Eligible automatic Runs include Webhook and Schedule entries and app events detected by polling, such as new Gmail messages. A final failure or indeterminate outcome can dispatch a handler. Manual Draft and Live Runs, successful Runs, and canceled Runs do not trigger dispatch.

A failed Run starts at most one handler Run per subscribed handler Flow. The deployment persists dispatch intent and rechecks handler eligibility before admission. A failed handler does not recursively dispatch more handlers.

## Outputs

*   `workflow` describes the source Flow and its fixed publication and Revision.
*   `execution` describes the source Run and terminal state.
*   `error` contains the code, message, and available failed-node or execution identities.

A Draft test can supply representative failure data without causing a fake production failure. Inspect actual production dispatch separately.

## Recovery choices

Handling an incident does not retry or repair the source Run. An indeterminate failure may already have produced an external effect. Inspect that system before repeating work. For node-local handling, see [errors and retries](https://openflow.run/en/docs/concepts/errors-and-retries/index.md).

## Sources

*   [docs/triggers/error-trigger.md](https://github.com/oomol-lab/open-flow/blob/e25a738d170322734572a0b8a1323cb00b9d355a/docs/triggers/error-trigger.md)
*   [docs/control/contracts/control-api.md](https://github.com/oomol-lab/open-flow/blob/e25a738d170322734572a0b8a1323cb00b9d355a/docs/control/contracts/control-api.md#flow-error-deletion-impact)
*   [packages/open-flow/src/workbench/browser/runtime/editor/addNodeOptions.ts](https://github.com/oomol-lab/open-flow/blob/e25a738d170322734572a0b8a1323cb00b9d355a/packages/open-flow/src/workbench/browser/runtime/editor/addNodeOptions.ts)
