Error handling

When an error occurs in a flow, and there is no error handling in place, the flow stops running. Although you'll get weekly notification of flow failures, you, and the people relying on the flow, probably don't want to wait that long to know that the flow failed. That's where error handling comes in. Error handling can limit or even eliminate flow failures and manage what happens when a flow does fail.

To implement error handling, determine which actions might cause the flow to fail. Look at any action where you use connections, because they often require regular credential verification. When credentials expire, it causes an authentication error and the flow will fail as a result. Other actions to check are those where specific permissions are needed, or those that are assigned to or rely upon a specific users. For a discussion of common causes of flow failures, see Troubleshooting a cloud flow

.

After you've identified which action or actions may cause your flow to fail, notice if there is a single action or multiple actions where errors may occur. If there's a only one action where you think an error may occur, then you may choose to use the Configure run after option to handle the error. If you notice that there are multiple actions where errors are likely to occur, you'll probably want to use the Scope action to handle errors.

For more information on error handling, see Microsoft's Error handling steps, counters, a new flow details experience and more

.

Using Configure run after you can specify what happens after an action executes. If the action fails, you can specify what the flow should do. The Configure run after is set on the action, from the options menu.

For a tutorial on how to set up email notifications for flow failures using Configure run after, see Error handling in Power Automate

. The second part of the tutorial discusses using Scope actions for error handling.

You can use the Scope action to handle errors for blocks of actions. Scopes provide a way to group two or more actions together; they can contain other actions. For a detailed discussion of using the Scope action for error handling, see Power Automate (Microsoft Flow) Error Handling

and Error handling in Power Automate – a few useful patterns
.

Give feedback

Was this document helpful?