Unhandled Error#
The Unhandled Error Task creates a global handler that captures any error raised by another task whose Error output is not connected. It is useful to centralize error logging and investigation, avoiding the need to attach a handler to every Task's Error output, while still allowing minor issues to be observed without disrupting the workflow execution.
Inputs#
| Name | Data Type | Description |
|---|---|---|
| Activate | any | Starts capturing unhandled errors. Only relevant when Auto Activate is false; otherwise the task is already active when the workflow starts. |
Outputs#
| Name | Data Type | Description |
|---|---|---|
| errorSourceId | String | Identifier of the task that originated the error |
| errorSource | String | Name of the task that originated the error |
| errorPage | String | Name of the workflow where the error was thrown |
| errorReceived | Object | The Error object thrown by the originating task |
| Success | Boolean | Emits true after a captured error has been processed and forwarded through this task |
| Error | Error | Error raised during the processing of this task itself (not the captured error) |
Settings#
| Name | Data Type | Value | Default | Description |
|---|---|---|---|---|
| Auto Activate | Boolean | true | If true, the task starts capturing unhandled errors as soon as the workflow starts; if false, it waits for the Activate input | |
| Handler Mode | Enum | AllWorkflows ThisWorkflow | AllWorkflows | Defines the scope of unhandled errors captured by this task |
| Context Aware | Boolean | false | Only available when Handler Mode is ThisWorkflow. If true, the task only captures errors raised within its own execution context or any of its subcontexts |
The Handler Mode setting controls the scope of the errors captured:
AllWorkflows: Catches unhandled errors thrown by any Automation Workflow of this Automation Controller, including subworkflows.ThisWorkflow: Only catches unhandled errors thrown in this task's workflow.
Behavior#
From the moment the task is activated, either automatically when the workflow starts (if Auto Activate is true) or when the Activate input is triggered, any unhandled error within the scope defined by Handler Mode is captured and emitted through this task's outputs.
In Data Flow, an error is considered unhandled when the task that originated it does not have a link on its Error output. Exceptions thrown by converters with no Error link are likewise delivered to this handler.
In Control Flow, a Try..Catch task takes over the errors raised in its branches, and a Call Function task takes over the errors raised in the function it calls, nested branches included. This task does not capture them:
- An error in the
trybranch runs thecatchbranch, when there is one. - An error that escapes the
catchbranch or the function is raised by theTry..Catchor theCall Functiontask itself, anderrorSourceIdanderrorSourceidentify that task. An enclosingTry..Catchcan handle it in turn.
The branch of a trigger is not taken over: its errors are captured even when the trigger is placed in a Try..Catch branch. A Break or a Return is not an error and is never captured.
The captured error is automatically logged by this task. A Log Message task (or any other diagnostic action) can still be attached to its outputs for additional logging or further investigation, without hindering the execution of the originating workflow.
Note
In Data Flow, if the task that generated the error has an Error port and a link to it, the error is considered handled and therefore not caught by this task.
Remarks#
In Control Flow, when an expression in an input row of a task fails, errorSourceId and errorSource identify that task, and the message is Failed to emit values to task '<task ID>' because '<reason>'. When the outputs of a task cannot be processed, they identify that task, and the message is Failed to process outputs from task '<task ID>' because '<reason>'.
Workflow Matching#
When an unhandled error is raised, the engine tags it with the name of the workflow where the originating task was running. On startup, the Unhandled Error task captures the name of the workflow it is placed in and keeps it as a reference. When Handler Mode is ThisWorkflow, the task only emits errors whose tagged workflow name matches its own reference; otherwise the error is ignored. In AllWorkflows mode this comparison is skipped entirely, so every unhandled error reaches the handler.
Subworkflows Behavior#
Each subworkflow is a workflow in its own right and is tagged with its own name when raising errors. As a consequence:
- An
Unhandled Errortask placed in a parent workflow withHandler Modeset toThisWorkflowdoes not capture errors thrown inside its subworkflows. - To handle errors locally inside a subworkflow, place an
Unhandled Errortask withThisWorkflowmode in that subworkflow. - To centralize error handling for a parent and all of its subworkflows in a single task, use
AllWorkflowsmode.
Context Matching#
The Context Aware setting refines the ThisWorkflow scope using the workflow's execution context (see Zones). It has no effect when Handler Mode is AllWorkflows.
When the task is activated, it captures the name of the execution context it was activated in and keeps it as a reference. For every unhandled error in the same workflow, the engine walks up the execution context chain of the originating task, starting from its current context and following the parent links. If any context along that chain matches the task's reference context, the error is emitted; otherwise it is ignored.
This is useful when the same workflow runs concurrently under different execution contexts — for example, when the workflow is triggered by multiple events, message bus messages, or driver subscriptions that each create their own context. With Context Aware enabled, each Unhandled Error task instance only reacts to errors raised inside the context it was activated in, or any of its descendant contexts.
When Context Aware is false (the default), context information is ignored and every error tagged with the current workflow name is captured, preserving the original ThisWorkflow behavior for backward compatibility.

