Skip to content

Commit

Permalink
Better error handling for unknown output (#675)
Browse files Browse the repository at this point in the history
This PR makes it easier to debug when an output id is used but not
present within the dataflow output list of a node.
  • Loading branch information
haixuanTao authored Oct 7, 2024
2 parents 6f7b030 + 60496e6 commit 7d93fe6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apis/rust/node/src/node/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ impl DoraNode {
self.handle_finished_drop_tokens()?;

if !self.node_config.outputs.contains(&output_id) {
eyre::bail!("unknown output");
eyre::bail!("unknown dora node output `{output_id}` called by `send_output`. Double-check if this output is defined within your dataflow YAML file.",);
}
let metadata = Metadata::from_parameters(self.clock.new_timestamp(), type_info, parameters);

Expand Down
2 changes: 1 addition & 1 deletion examples/echo/dataflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ nodes:
build: pip install -e ../../node-hub/dora-echo
path: dora-echo
inputs:
input: terminal-input/data
echo: terminal-input/data
outputs:
- echo

Expand Down

0 comments on commit 7d93fe6

Please sign in to comment.