Skip to content

Branch based on specific error conditions

Each action in Power Automate Desktop has a predefined set of errors that can occur.

When an error occurs, you can also branch the processing according to the type of error.

This article explains how to branch the processing for each error that occurs.

When you configure an action, there’s an “On error” button in the lower-left corner of the action’s editing window.

error button

Clicking it lets you control whether to retry the action when an error occurs (by default, once at a 2-second interval). You can also configure what happens when any error occurs, or when each individual error that the action can raise occurs.

error window

By default, all errors are set to “Throw error.” If an error occurs in this state and the action is inside an “On block error” block, the innermost block catches the error and runs the processing defined in that block. If the action isn’t inside a block, the flow stops with an error.

If you change this to “Continue flow run,” the error isn’t thrown, and the block’s error handling doesn’t run either. You can choose what happens after continuing from “Go to next action,” “Repeat action,” and “Go to label.” You can also use “New rule” to set a variable or run a subflow when an error occurs.

Think of it as implementing block-style error handling for each individual action.

The screenshot shows the error settings for the “Send mouse click” action.

Open “Advanced” to see all the errors that the action can raise.

By defining what the flow does for each error here, you can branch the processing depending on the error.

For example, if the error “Can’t send mouse click in non interactive mode” occurs, you could branch to a flow designed specifically for non-interactive mode.