Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c664c6c

Browse files
authored
feat(clear-error): add flow names into error messages (#989)
1 parent 7e80c85 commit c664c6c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/builder/analyzed_flow.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ impl AnalyzedFlow {
2020
flow_instance_ctx: Arc<FlowInstanceContext>,
2121
) -> Result<Self> {
2222
let (data_schema, setup_state, execution_plan_fut) =
23-
analyzer::analyze_flow(&flow_instance, flow_instance_ctx.clone()).await?;
23+
analyzer::analyze_flow(&flow_instance, flow_instance_ctx.clone())
24+
.await
25+
.with_context(|| format!("analyzing flow `{}`", flow_instance.name))?;
2426
let execution_plan = async move {
2527
shared_ok(Arc::new(
2628
execution_plan_fut.await.map_err(SharedError::new)?,

src/execution/source_indexer.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ impl SourceIndexingContext {
382382
error!(
383383
"{:?}",
384384
e.context(format!(
385-
"Error in processing row from source `{source}` with key: {key}",
385+
"Error in processing row from flow `{flow}` source `{source}` with key: {key}",
386+
flow = self.flow.flow_instance.name,
386387
source = self.flow.flow_instance.import_ops[self.source_idx].name,
387388
key = row_input.key,
388389
))

0 commit comments

Comments
 (0)