Steps to reproduce:
Create a flow with a do until loop, and an approval task in the loop. Use a dynamic field as the "assigned to". If the assigned to field has an appropriate value, the flow should work fine. If the assigned to field is empty, the action will fail, but the loop will continue executing. I expected the entire flow to fail, as it normally does when encountering an exception.
Could you please share a screenshot of the configuration of your flow?
I have made a test on my side, if the assigned to field is empty, the flow would continue to run until the Do Until is finished, and when the Do Until is finished, we could see the error message inside the each loop in the Do Until.
Do you want your flow would fail immediately in the loop if the assigned to field is empty?
If yes, I afriad that you couldn't achieve your requirement in microsoft flow currently, because the Do Until would continue run until it is finished event if one loop has run failed.
As you can see below, in the loop, an email is sent, followed by an approval, followed by another email. In this case, I ran it without a value in the approver field, so the approval step was guaranteed to fail. Note that the follow-up email that is after the approval was never sent. This makes sense, as the approval action failed, and so that action was not reached. However, the loop kept looping, despite the failure. The end result is that over a several minute period, I received 60 emails (from the first send an email action in the loop). Apparently, after 60, the system decided to cut it off. Curiously, the error message doesn't say anything about hitting a maximum number of loops, but rather states: "The request failed. Error code: 'InvalidApprovalCreateRequestAssignedToMissing'. Error Message: 'Required field 'assignedTo' is missing, empty, or contained no valid users.'."
Again, I would expect the flow to fail and stop executing, like it does when there is no loop. Or, I would expect a set of options for the loop that would allow me to select a behavior for when there's an error. But simply having the loop try to execute 60 times in a row is unwanted, and could result in a huge problems if business users are suddenly spammed with 60 emails.
The Do Until would continue run until it is finished event if one loop has run failed in microsoft flow currently.
If you want the Do Until would run failed immediately when one loop has run failed, you could submit an idea to Microsoft flow Idea Forum:
Fill out a quick form to claim your user group badge now!
We've given our badges an overhaul and also added some brand new ones!
Learn how to build the business apps that you need.
Find out where you can attend!
Watch & learn from the Power Automate Community Video Gallery!