You create an automated flow.
Sometimes your flow encounters the error and stops the execution.
You need to implement the error handling for the flow.
What should you do to add the error handler to the flow?
Click on the arrows to vote for the correct answer
A. B. C. D. E.Correct Answer: B
Suppose you need to retrieve a record from the Dataverse Account table by a row ID, but the record does not exist.
You will get an error, and the flow execution stops.
You need to add an error handler to mitigate possible errors in your flow.
Power Automate provides an option "Configure run after" (Number 2) that helps the flow to proceed if a node fails.
You can see this option in a menu when you click on the three dots in a node (Number 1)
Power Automate opens a new screen for the node (Number 3) if you select the menu item.
On the snapshot, the "Configure run after" screen is for the next node after the "Get a row by ID" - the "Switch" node.
By default, the "Configure run after" option is set to "is successful" (Number 4)
You need to check "has failed" (Number 5)
This setting tells the flow to run the Switch node even after the "Get a row by ID" action fails.
You need to add a Switch action for the error triage and create the cases for successful execution of the "Get a row by ID" node and for error codes.
You can capture the Web APIs HTTP errors like 404 and 500 (Number 1)
Or you can get more in the details of the node outputs and capture the Dataverse error code (Number 2).
You must input the expression for the Switch “On”
If you want to capture the status code, the expression can be the following: outputs('Get_a_row_by_ID')['statusCode']
For the Dataverse error code - outputs('Get_a_row_by_ID')['body']['error']['code']
BTW, the outputs('Get_a_row_by_ID') is the shortcut for actions(‘Get_a_row_by_ID').outputs.
You can also implement the Try-Catch construction using the Scope control action and “Configure run after” options.
All other options are incorrect.
For more information about the Power Automate error handler implementations, please visit the below URLs:
To add an error handler to an automated flow, you can follow these steps:
Add a "Scope" action: To group actions that will be part of the error handling flow, you can add a "Scope" action. This action allows you to group a set of actions and define the error handling logic for that group.
Configure the "Scope" action: In the "Scope" action, you can set the "Error Handling" configuration. This configuration allows you to define what happens if an error occurs in the group of actions included in the "Scope" action.
Choose the error handling strategy: There are several error handling strategies that you can choose from, depending on your requirements. Some of the available options are:
Add actions to the error handling flow: Depending on the error handling strategy you choose, you may need to add some actions to the error handling flow. For example, if you choose the "Continue" strategy, you may want to add an action to send an email notification about the error.
Test the error handling flow: It is important to test the error handling flow to make sure that it works as expected. You can test the flow by intentionally causing an error in one of the actions included in the "Scope" action.
In the given answers, the following options can be considered for error handling:
A. "Add a Terminate action": This option can be used if you want to stop the execution of the flow if an error occurs. This option can be considered if you choose the "Terminate" error handling strategy.
B. "Set Config run after": This option is not directly related to error handling. This option allows you to define the order in which actions are executed.
C. "Add a Switch control": This option is not directly related to error handling. The "Switch" action allows you to define different paths in the flow based on a condition.
D. "Set a Condition action": This option is not directly related to error handling. The "Condition" action allows you to define a condition that determines whether an action should be executed.
E. "Set Do until action": This option is not directly related to error handling. The "Do until" action allows you to repeat a set of actions until a condition is met.