diff --git a/frontend/src/components/workbench/panel/workflow-panel.tsx b/frontend/src/components/workbench/panel/workflow-panel.tsx index 106cf4fac..b2e9c16d2 100644 --- a/frontend/src/components/workbench/panel/workflow-panel.tsx +++ b/frontend/src/components/workbench/panel/workflow-panel.tsx @@ -102,6 +102,8 @@ const workflowUpdateFormSchema = z.object({ return z.NEVER } }), + /* Error Handler */ + error_handler: z.string().nullish(), }) type WorkflowUpdateForm = z.infer @@ -138,6 +140,7 @@ export function WorkflowPanel({ returns: isEmptyObjectOrNullish(workflow.returns) ? "" : YAML.stringify(workflow.returns), + error_handler: workflow.error_handler || "", }, }) console.log("workflow alias", workflow.alias) @@ -293,6 +296,39 @@ export function WorkflowPanel({ )} /> + ( + +
+ + Error Handler + + {field.value && ( + + )} +
+ + The workflow ID or alias of the error handler + workflow. + + + + + +
+ )} + />
Workflow ID diff --git a/tests/unit/test_workflows.py b/tests/unit/test_workflows.py index 8eb29e50c..b833eed6c 100644 --- a/tests/unit/test_workflows.py +++ b/tests/unit/test_workflows.py @@ -2447,11 +2447,11 @@ def assert_erroneous_task_failed_correctly( ) assert evt is not None, "No failing task event found" - # Check fail_evt group exists and type + # Check event group exists and type assert evt.event_group is not None assert isinstance(evt.event_group, EventGroup) - # Check fail_evt group attributes + # Check event group attributes group = evt.event_group assert group.udf_namespace == "core.transform" assert group.udf_name == "reshape" @@ -2507,9 +2507,6 @@ def assert_error_handler_initiated_correctly( # Check that the error handler DSL was passed correctly assert group.action_input.dsl == handler_dsl - # # This would be the actual error handler workflow execution - # assert group.related_wf_exec_id == failing_wf_exec_id - # Check that the error handler's parent is the failing workflow assert ( group.action_input.parent_run_context