I have often been writing about how to handle exceptions and get the correct and detailed error message describing in an easy and clean matter the failures in our processes:
- Logic Apps: Catching errors
- How to get the Error Message with Logic App Try-Catch (Part I)
- How to get the Error Message with Logic App Try-Catch (Part II) – Using an Azure Function
- How to get the Error Message with Logic App Try-Catch (Part III) – Using a generic Logic App
- Logic App Best practices, Tips and Tricks: #6 Error handling… configure run after settings
- Logic App Best practices, Tips, and Tricks: #15 get the error message
And the reason why that happens is that we need to accept the fact that at a certain point in time, our process will fail. Or by the fact we did some updates that weren’t tested properly, an external system is down or in intervention, or by issues in Microsoft infrastructure, and so many other reasons. But when that happens, one thing is clear: we want to get the exact error message describing why it failed. But, of course, we can always go to the Logic Apps run history – except if it is a Stateless workflow on Standard – to check where and why it failed. And obviously, we will have all the information necessary to solve the problem. However, most of the time, if not always, we want to log the error in some place like Application Insights, SQL Database, Event Hubs, and so on in an automated way without human intervention. To accomplish that, we need to access this error message in runtime.
By default, Logic App allows handling errors using the Configure run after settings at a per action level. For more complex scenarios, it can be done by setting up Scope action and implementing try-catch/try-catch-finally statements. However, getting a detailed error message can be a bit challenging inside Logic App, and you will find different approaches to implement the same capabilities, each of them with advantages and disadvantages.
For those reasons, my teammate Luis Rigueira and I decided to create this 60 pages detailed whitepaper: Logic Apps Consumption – How to get the Logic App error detail message guide.
What’s in store for you?
In this whitepaper, we will be addressing some of the possible ways to address these needs but also addressing some of the following questions:
- How can I implement error handling?
- This is an important question and topic because, without proper error handling, we will not be able to send in an automated way access the error message instead, our workflow will finish in that action with a failure state.
- What out-of-the-box features do I have to capture and access the error details?
- How can I improve these default features in a no-code, low-code way and in a code-first approach?
Where can I download it
You can download the whitepaper here: