On a regular basis I refer Microsoft Flow developers to my Try-Catch-Finally-patttern, but what if you need to use LogicApps. Can you use the same pattern?
Well, you could but …
There is a small catch.
When I use my Try Catch Finally template in Logic Apps, I found that it isn’t possible to include details about the runs in the email sent when there is a problem with my flow as I can build a URL to my flow run.
In LogicApps however you cannot generate a Url to a flow run as there isn’t any url to go to. Azure’s blades showing the Logic App run doesn’t have a Url to point the user to. There is however an Id:
This Run Id you can find using the following expression
workflow()?[‘run’]?[‘name’]
The user checking out the failure can now use this Id in the email to filter the LogicApps runs in Azure.
[…] Implementing a Try, Catch, Finally in Logic Apps by Pieter Veenstra […]
Nice work Pieter: my try, catch and finally works really well based on your model. I put a terminate at the end of my catch to the finally scope doesn’t ever run. like you, I use the workflow()?[run’][‘name’] in my email to the user ( for them to quote) but as you say, there is no link to the item. Do you use Azure Insights or Power BI to capture more info on runtime errors?
In general I don’t collect any further details but it would be possible to do so.