cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AIUYM19
Helper V
Helper V

How to prevent one failed action from failing the whole flow

I've been experimenting with some error handling in my Power Automate flows, because much of the time, the errors that occur are ones that can be ignored, and I still want the rest of the flow to run. Typically, I've been using a model where after an action that has a non-negligible probability of failure, I have two parallel branches: one that runs if the action was successful and one that runs if the action failed. For simple cases, this has been working.

However, in flows where the failure can occur within a scope or other control block, the failure of any action within that block causes the entire block to fail, even with that error handling inside. Take this example...

PowerAutomate_FailedScope.png

The action outside of the block is configured to run if its "parent" branches are successful or skipped. But when anything inside that scope block fails, the whole scope is marked as failed, so that following action doesn't run. You can see in the image that the error handling itself actually worked; the "failed" branch ran, and the "successful" branch was skipped. So, how do I make this situation report the scope as a whole as successful?

1 ACCEPTED SOLUTION

Accepted Solutions
AIUYM19
Helper V
Helper V

The only solution I've found to this is to change how the error handling works. Instead of configuring the succeeding actions to run after "is successful" and "is skipped," I also needed to enable "has failed."

This has the effect of causing the error handling to work not as intended, however. I want the flow to continue if and only if the preceding actions in all relevant branches was successful or skipped, but I don't want the flow to continue if one of those actions failed. The problem lies in the behaviour of the scope container, which is reported as "failed" even if error handling within it has ensured a failed action is handled properly, and all subsequent actions in the container were successful or skipped.

Suggestion to Microsoft: re-tool the scope container to report a "successful" status if the final actions of each contained branch is either successful or skipped following an error handler. I will post an idea to this effect.

View solution in original post

3 REPLIES 3
CFernandes
Super User
Super User

Hey Mate,

 

You can add Error handling - https://flow.microsoft.com/en-us/blog/error-handling/

 

CFernandes_0-1618850203987.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Hi, @CFernandes. That's precisely what I've done (described in my original post), but the entire block is still marked as failed, when it should be marked as successful, because the error handling inside was successful.

AIUYM19
Helper V
Helper V

The only solution I've found to this is to change how the error handling works. Instead of configuring the succeeding actions to run after "is successful" and "is skipped," I also needed to enable "has failed."

This has the effect of causing the error handling to work not as intended, however. I want the flow to continue if and only if the preceding actions in all relevant branches was successful or skipped, but I don't want the flow to continue if one of those actions failed. The problem lies in the behaviour of the scope container, which is reported as "failed" even if error handling within it has ensured a failed action is handled properly, and all subsequent actions in the container were successful or skipped.

Suggestion to Microsoft: re-tool the scope container to report a "successful" status if the final actions of each contained branch is either successful or skipped following an error handler. I will post an idea to this effect.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,078)