I am building a Logic App that contains a foreach loop in a synchronous style (constrained to one execution at a time, concurrency=1). Within each foreach loop, there is a switch statement that calls different child Logic Apps depending on the contents of the item the foreach loop is iterating over.
I've discovered that if one of these child Logic Apps fail, the foreach loop continues on as if nothing happened, executing the subsequent tasks as determined by the contents of the array. I cannot find any way to halt (break) the execution of the foreach or terminate the whole logic app based on the failure of one of the child logic apps within the foreach loop.
If the same child Logic App were to fail without being inside the foreach loop, the execution of the parent Logic App would be halted. This seems a very strange design decision and creates an inconsistency with how Logic App execution behaves inside vs outside a loop.
Additional note: To add insult to injury, when you execute a child Logic App, even if it's an HTTP trigger and response, you don't appear to get access to the HTTP status code it returns in the calling (parent) Logic App. So even if I wanted to manually test every single case I have in my loop, I can't figure out how to do that.