Raj
Raj

Reputation: 95

Azure logic app's try-catch specific error capture does not work

I am creating an azure logic app workflow with try & catch scope to capture specific exception message happens in one of actions within try scope.

As per the documentation, I am filtering Failed status of result('try') but still getting generic message " An action failed. No dependent actions succeeded." even when I try to capture body('Filter_array')?[0]?['error']?['message']

I followed this article & azure documentation as well but no luck: https://www.tech-findings.com/2022/06/Exception-Handling-in-Logic-app.html

response screencapture

steps followed as per documentation

Upvotes: 0

Views: 1527

Answers (1)

RithwikBojja
RithwikBojja

Reputation: 11253

I have reproduced in my environment and got expected results try to follow below process then you will get output as I got:

Firstly, I have taken trigger and initialized variable as:

enter image description here

Then I have used scope as below:

enter image description here

Then I have set variable as below to get error (using this scope as try):

enter image description here

Then I added another scope to catch with run after as below (Using this scope as Catch):

enter image description here

Then i filtered array as:

enter image description here

enter image description here

Then composed it as :

enter image description here

Output:

enter image description here

The Scope(Try) error is composed into Scope2(Catch) as below: enter image description here

Try to follow above steps you will get output as I got, I guess this clears all your doubts.

Upvotes: 1

Related Questions