---
sourceDocument: Australia Build workflows
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/build-workflows

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Build workflows

ft:clusterId :

    - crworkflow

bundleId :

    - crworkflow

workflow :

    - Creator


---

# Add an error handler to a flow

# Add an error handler to a flow {#ariaid-title1}

* Release version: Australia
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read

Run a sequence of Workflow Studio actions and subflows to identify and correct issues that are caused by flow errors.

## Before you begin

Role required: flow_designer or admin

## About this task

A flow error handler allows your flow to catch an error and run a set of actions, flow logic options, and subflows.  
Important:  
A flow error handler cannot resume or restart a flow that produces an error.

## Procedure

1. Navigate to AllProcess AutomationFlow Designer.
2. Create a flow or open an existing flow.  
   For more information about creating a flow, see [Create a flow in Workflow Studio](https://servicenow-prod.fluidtopics.net/gEVHy7dO3gkmJ7P2I90Ygg "Run a sequence of actions and flow logic when the trigger conditions occur.").
3. Enable the ERROR HANDLER switch.  
   Workflow Studio adds an error handler section to the flow and the Data pane.
4. Add actions, flow logic options, or subflows to the Error Handler section.  
   You can add up to 10 actions, flow logic options, or subflows to this section. Consider using a subflow to capture the error information or to correct issues with the record data.  
   You can add flow logic options to the error handler. These options are described in the following table.{#add-error-handler-flow__table_ipd_5q5_dsb__entry__2}

   | Flow logic option | Description |
   |-|-|
   | If | Selectively apply one or more actions only when a list of conditions is met. For more information, see [If](https://servicenow-prod.fluidtopics.net/nR06QTqfpGjIp8_whZe0CQ "Selectively apply one or more actions only when a list of conditions is met."). |
   | Wait for a duration of time | Use this flow logic option to pause the flow for a specified time period and resume the flow execution after the time period elapses. For more information, see [Wait for a duration of time](https://servicenow-prod.fluidtopics.net/jta33j7A9dgcVulpsFKEdg "Use this flow logic to give your users time to act during automated processes or to wait for a specific date and time to complete actions."). |
   | End Flow | Use this flow logic option to stop a flow within Workflow Studio. For more information, see [End Flow](https://servicenow-prod.fluidtopics.net/NAyoEtyTqpGliQlDlcqNCg "Stop running the current flow. Use End Flow within a branch of the flow to specify an exit condition. For example, end the flow when it reaches a specific If flow logic block."). |
   | Dynamic Flow | Identify and run a flow or subflow dynamically by using runtime data. Build templates to provide expected inputs for dynamically called flows or subflows. For more information, see [Dynamic Flow](https://servicenow-prod.fluidtopics.net/9CA7wcyPkP1MnkHwcFtX5Q "Identify and run a flow or subflow dynamically by using runtime data. Build templates to provide expected inputs for dynamically called flows or subflows."). |
   | Set Flow Variables | Assign a value to one or more flow variables. Change or update a variable's value during a flow. For more information, see [Set Flow Variables](https://servicenow-prod.fluidtopics.net/taLpFCTeLjMl12m~qAkCGw "Assign a value to one or more flow variables, which store flow data as data pills. Access flow variable values by referring to their data pill."). |
   [Table 1. Supported flow logic options]

   {#add-error-handler-flow__table_ipd_5q5_dsb}

   The Error Status object contains the information about the flow error. You can also use the Action Status object that is returned by each action to build the conditional logic. Both of these objects are
   available from the Data pane.
5. **Optional:** Add stages in the Error Handler.  
   For more information on how to add stages, see [Configure stages and add them to a flow](https://servicenow-prod.fluidtopics.net/j9aPIJwHLrGiUPkN0w7yKA "Configure when stages display to a user, define stage state labels, and add stages to a flow or subflows within Workflow Studio.").
6. Add a custom action to the main body of the flow that throws an error.  
   To learn how to create a custom action, see [Create a custom action to throw an error](https://servicenow-prod.fluidtopics.net/3jvdFcedzlCoF87ZdGwMMQ "Create an action that intentionally throws an error to test flow error handling.").
7. Test your flow to ensure that the error handler works as expected.  
   For more information about testing a flow, see [Test your flow](https://servicenow-prod.fluidtopics.net/16GAKmUMqo2akmwgAuG1TA "Before activating a flow so other users can access it, test to make certain it works the way you expect.").
8. When your flow error handling is working as expected, select the delete icon next to your custom action that throws an error to remove it from your flow.

## Result

Your flow runs the actions, flow logic options, and subflows that you specify when the flow produces an error. The flow execution details display the Completed (error caught) state for both the flow and the action that returned an error.

*[\>]: and then


