web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Best Practices for PAD...
Power Automate
Unanswered

Best Practices for PAD Error Handling?

(0) ShareShare
ReportReport
Posted on by 2

Hi all, I'm new to PAD. For error handling, I have read this: https://powerusers.microsoft.com/t5/Power-Automate-Desktop/Error-Handling-Desktop-application-Error-Message-Dialog-Box/m-p/955799

this: https://powerusers.microsoft.com/t5/Power-Automate-Desktop/On-Block-Error-not-triggering-amp-quot-index-out-of-range-amp/m-p/1325818

and this: https://powerusers.microsoft.com/t5/Power-Automate-Desktop/On-Error-Block-not-triggering-and-catching-error-resulting-in/m-p/1248800#M6412

 

After some try, I haven't get the best way to handle error.

1. Central Error Handler Flow?

I'm a VBA old dog. In VBA I use a Central Error Handler function from Professional Excel Development for log error, display error message, raise/re-throw error and so on.

I try to create a  Central Error Handler Flow, but:

1) PAD flow call another flow is slow;

2) Error object can't be pass as a input/output variable;

3) there no global variable can setup DEBUG/RUNTIME mode .

Another idea is using sub-flow, but:

1) Must copy code to very flow's error handler sub-flow, if code changed, I must do it again for every flow;

2) If call a flow from another flow, witch error handler sub-flow should be use? How to know the error has being handled or should be raise again?

 

2. Where or when to display Error Message?

I have try use a [Display message] action to display error message, but the message will stop the all flow running. It like a Break but not a MsgBox in VBA. Yes, in edit mode, all error will display at the window bottom. I think it like a debug mode not for runtime. In runtime what's the best way to display error message? Or it's all should not be displayed?

 

Thanks!

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    In regards to the last point, I’m not at my computer, but I believe there is a “Get Last Error” action, so what we have been doing is an ‘On Error Block’ surrounding the entire Main flow that runs an Err_Subflow that just says, ‘Write %Lasterror% to text file.’

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 664

#2
Haque Profile Picture

Haque 460

#3
Valantis Profile Picture

Valantis 357

Last 30 days Overall leaderboard