<aside> 💡 Do you know that you can use the action On block error as the exception handler for the entire desktop flow?
Power Automate for desktop enables you to handle errors at the action level through the On error functionality:
In addition, you can also implement error handling for a group of actions through the action On block error:
However, it is not obvious how exception handling can be applied to the entire desktop flow to ensure that any and all errors will be caught and handled.
To create an exception handler for the entire desktop flow, you can apply the action On block error to the entire Main flow:
When an error occurs, the subflow FlowExceptionHandler will be triggered:
The subflow FlowExceptionHandler will retrieve the last error that occurred in the Main flow:
Note that you need to specify what happens thereafter, e.g. send an email notification to inform the user about the error.