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 / How to get more detail...
Power Automate
Answered

How to get more details on an error condition with PAD?

(0) ShareShare
ReportReport
Posted on by 150

With WinAutomation, I immediately and reliably received an email as soon as a process failed, and the email had a line number and function name for the failure. Also in the WA console I could see this information.

 

With PAD, it sometimes sends me an email with the failure and the process, but no line number or function. And it seems like sometimes it waits to, or doesn't, send me flow errors instead of emailing them immediately.

 

For example, this error I received today is pretty useless because the error could have happened in one of many places and it's very hard to duplicate every scenario for each use in my large and complex process.

 

ApexOrigin_0-1669151985484.png

Anyone know how to get better info on errors, or is this another area that Microsoft has let us down?

I have the same question (0)
  • Verified answer
    ThomasFonn Profile Picture
    273 on at

    Hello @ApexOrigin 

     

    use @momlo's approach for the exact line,

     

    You could use "On Error block" blocks to capture and log where the error is happening. You probably won't get the line number, as it would be hard to maintain, You can narrow it down to the specific block by assigning an error message to the specific action you try to do.

     

    Example of loggingExample of logging

    Sorry that the image is in Swedish, but it should look similar in other languages

  • Verified answer
    momlo Profile Picture
    1,527 Super User 2024 Season 1 on at

    Hi @ApexOrigin ,

     

    You can use On Error block to build logic where you can then use Get Last Error which, basically holds all th information you cna get, including, message, details, sub-flow, action number in sub-flow etc.

     

    See here:

    https://learn.microsoft.com/en-us/power-automate/desktop-flows/errors

     

  • Verified answer
    VJR Profile Picture
    7,635 on at

    You can perhaps get some information from the Get Last Error action and print it to a log file or send an email.

    With the help of string functions you can extract the line number.

     

    VJR_0-1669203258134.png

     

    Use it in conjunction with the On block error.

     

  • ApexOrigin Profile Picture
    150 on at

    I am late, but I wanted to say thank you to @ThomasFonn and @momlo and @VJR for the replies.

     

    Yes, the On Block has been a lifesaver for me to debug my subflows, especially the ones that process over 100K lines of log files and run into a problem somewhere in the middle. It would be very impractical to wait days for the step through approach to reach the error condition.

     

    Question: Can you put an On Block to cover the entire main flow with all its calls to subflows, or does it need to be in each subflow to give the details?

  • momlo Profile Picture
    1,527 Super User 2024 Season 1 on at

    Yes, you can cover the entire main flow - just put on an error block and then all actions within that block.

    This is what I do as a standard way to manage situations when desktop flow fails due to errors not captured by my error handling dedicated to sub-flows, loops, actions or specific regions of the flow. 

    In such cases where the error is not handled anywhere "beneath" the main flow, it is captured by the main error block, which I call my "CleanFail" sub-flow designed to ensure all apps/files are closed, unnecessary files removed etc.

  • ApexOrigin Profile Picture
    150 on at

    Excellent! Thank you again, momlo!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard