Smart people are very useful. Sometimes just talking to them helps you understand the technology better. Consider, for example, John Liu educating ignorant yours truly about the intricacies of failing Power Automate flows.
For a flow run to be a success, all execution paths including those containing skipped actions, must complete.
I thought that if you have an error handling branch in your flow then you’re all good. Consider this flow, where HTTP action fails because I’m getting a non-existent URL:
This is my “error handling”:
I’m handling all possible execution paths so I should be OK, right? Wrong (otherwise this tip wouldn’t see the light of the day) – my flow is marked as failed:
I’ve been under the delusion that it’s the error that causes the drama. Not so, says John.
It’s not the error path that is a problem it’s the skipped branch that is at fault.John Liu who needs no introduction
Let’s try again, this time adding a step that will continue execution of the left (not so good, after all) branch:
Power Automate is really happy now:
If you can’t or won’t keep track of all execution paths of your flow, the most brutal method is to terminating the flow whenever you want and pretend that everything is fine.
Pretending bad stuff didn’t happen is what a lot of people choose to do with their lives so I don’t see how flow should be any different.
Cover photo: Wikimedia