top of page

Create an exception handler for the entire desktop flow

💡 Do you know that you can use the action On block error as the exception handler for the entire desktop flow?

Problem Description


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.



Solution


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.


Additional Information


  • Last updated on: 29 Jan 2023

  • Tested version(s): 2.27.177.22340

  • Prerequisites: None

  • Dependencies: None

  • Known issues: None

bottom of page