Exception Handling
An exception is an event that occurs while a program is executing and disrupts the flow of its instructions.
Exception handling ensures that the flow of the program doesn't break even when an exception occurs.
Individual Action's Exception Handling in Logic App
Retry Policy in Logic App
Applies to intermittent failures, characterized as HTTP status codes 408, 429, and 5xx, in addition to any connectivity exceptions.
Individual Action's Exception Handling in Logic App
Run After property in Logic App
Options available to use:
is successful
has timed out
is skipped
has failed
Get error message of a failed action in Logic App
Configure Run After property -
select has timed out and has failed status.
Capture the error msg, for that use following expression
actions('ActionName')['error']['message']
Make use of flow controls shape - Scope shape.
Scope to run set of actions and if any action in the scope fails unexpectedly, it is marked as "Failed" or "Aborted" .
Add a condition that checks the scope's failed status
Multiple Action's Exception Handling in Logic App - Using Scope
Filter Array action from Data operations and result() function
Add Filter array in Catch Exception scope and input to it - result('Try') , with a condition to check items having status as failed.
Expression to get error message
body('Filter_array')?[0]?['error']?['message']
get actual error message of Scope in Logic App