fix(flows): populate error handler input args from failure picker (#9087)

* fix(flows): populate error handler input args from failure picker

* style(flows): fix indentation in failure-step branch
This commit is contained in:
Arnaud
2026-05-08 16:57:36 +00:00
committed by GitHub
parent 935c666d50
commit f37d360644
@@ -4,10 +4,10 @@ import {
dfs,
getPreviousModule,
getStepPropPicker,
type PickableProperties
type PickableProperties,
getFailureStepPropPicker
} from './previousResults'
import { evalValue } from './utils.svelte'
export class StepsInputArgs {
#stepsEvaluated = $state<Record<string, Record<string, any>>>({})
#steps = $state<Record<string, Record<string, any>>>({})
@@ -158,6 +158,15 @@ export class StepsInputArgs {
flow: OpenFlow | undefined,
previewArgs: Record<string, any> | undefined
) {
if (id === 'failure' && flow && flow.value.failure_module && flowState) {
const picker = getFailureStepPropPicker(flowState, flow, previewArgs)
this.initializeFromSchema(
flow.value.failure_module,
flowState['failure']?.schema ?? {},
picker.pickableProperties
)
return
}
if (!flowState || !flow) {
return
}