Catch errors with Try, Catch and Finally
Quiz question
How do you set Configure run after on the Catch scope?
Solution
- A) has failed and has timed out on, is successful offCorrect. That way Catch only runs when something in the Try scope fails or takes too long.
- B) Tick all four statuses so Catch always runsWrong. That is how you set up Finally. Catch would otherwise also start after every successful run.
- C) Tick only is successful so Catch follows TryWrong. Then Catch would only run when everything works, exactly when there is nothing to catch.
What it is about
Without error handling, a flow stops at the first failing action, and nobody finds out. With three scopes you rebuild the pattern from programming. The Try scope holds the actual logic. The Catch scope runs only when Try fails: under Configure run after you tick has failed and has timed out and leave is successful unchecked. There you notify someone or write a log entry. The Finally scope always runs, with all four statuses ticked, and cleans up. With result('Try') you read in Catch which action failed. If the run should show as failed in the run history, add a Terminate action with the status Failed in Catch.
The expression from the tip
result('Try')When to use it, when not
Use it
In every flow whose failure someone needs to notice: interfaces, files, records in Dataverse.
Better not
In a short test flow that you start yourself and whose run you follow directly.
Most common mistake
Leaving critical actions outside the Try scope. Catch never sees what fails there.
License
Standard Runs without a premium connector, so the license from Microsoft 365 is enough. Source on Microsoft Learn: Power Automate licensing FAQ. For your whole flow: License check.
Share
Short link: powerautomate.ninja/en/15
Source: PowerPlatformTip #15, Microsoft Learn: Employ robust error handling.