File size: 1,189 Bytes
05bf0df d202a2e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ---
title: Workflow Error Propagation
emoji: 🌖
colorFrom: gray
colorTo: purple
sdk: gradio
sdk_version: 6.20.0
python_version: '3.13'
app_file: app.py
pinned: false
---
# Repro: downstream workflow nodes still run after an upstream node fails
Minimal reproduction for a `gr.Workflow` bug: when an upstream node raises an exception, downstream nodes are not skipped. They execute with `None` for the input that the failed node was supposed to produce.
## Steps
1. Open the app and click Run on the canvas.
2. The `first` node fails as expected (it always raises `ValueError("boom")`).
3. The `second` node, whose only input comes from `first`, still runs: its node shows `got: None`, and the server log prints `second() called with None`.
Expected: `second` should not run its body. It should be marked as failed with the existing "upstream node failed" message, like other node types.
## Why it happens
The executor's fail-fast guard in `workflow-executor.ts` checks `port.required && inputs[port.id] === null`, but the fn-node ports generated from `bind=` never set `required`, so the guard is skipped and `null` flows into the function call. See the linked issue for details.
|