Get the status of logic apps execution

I have a requirement where a mail trigger is needed if Logic apps executions fail?

As we are aware, logic apps can fail in any step and it does not move to the next action when the previous action fails.

In this case, how do I get the status of execution and trigger a mail alert?