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 / The "On block error" e...
Power Automate
Answered

The "On block error" execute first than the line error management. I don't want that

(0) ShareShare
ReportReport
Posted on by 122

Hello to all,

 

I have a question and I hope you can give me a hand.

 

I have included an "On block error", but I have also included in a line an error management (it waits for a window to appear for a certain time), but when the error occurs, instead of doing the error management of the line first, it does directly the "On Block error".

Is there any way to make it do the line error management first?

 

Thank you all!

I have the same question (0)
  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    It should in general do the action level error handling first and only trigger the On block error if there is no error handling at the action level, or the action level rules are set to throw an error instead of continue the flow.

     

    Can you share some screenshots of the actions and provide some more context on what you expect them to do, and what theh actually do?

    -------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

     

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • BLabat83 Profile Picture
    122 on at

    @Agnius , you answer faster than my wife the whatsapps! Thank you very much!


    Sure, I attach some screenshots. Sorry they are in Spanish.

    The only thing I want is that if the screen timeout is longer than one minute, it goes to the next action.

    - These are the Action screenshots:

    PAD.JPG

    PAD2.JPG

    PAD3.JPG


    - These are the Block error:

    PAD4.JPG

    PAD5.JPG



    Thanks again!

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Your setup seems to be correct. Are you sure the On block error is triggered by this specific action? Can it be that something else fails? Maybe if the wait times out due to the element not appearing on the screen, the following step fails?

  • BLabat83 Profile Picture
    122 on at

    The following actions are simple and come with a conditional. I attach screenshots.

    How can I know which action is causing the error? Can you think of a system to log line errors?

    PAD7.JPG

    PAD8.JPG

    PAD9.JPG

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    It seems like your On block error is calling a sub-flow. Add a Get last error action into your subflow and then write the error into a text file using Write text to file or something like that. This would give you a quick indication of what exactly failed.

    -------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

     

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • BLabat83 Profile Picture
    122 on at

    This sound awesome!! Thanks!!!!! 

     

  • BLabat83 Profile Picture
    122 on at

    Hello again @Agnius ,

     

    I finally implemented the error log and I see that the error block is executed when it exceeds the time, instead of execute the error management of the action.

     

    Any idea how to make it error management first instead of the block?

    Thanks!

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Normally, that is actually the way it works. The whole idea of it is that action-level error handling has priority over the error block. No idea why it would act otherwise and I have never had a case like that, but I do quite frequently use Wait for windowWait for window contentWait for web page content or Wait for image in this exact way inside error blocks.

     

    I would suggest you make sure you're running on the latest version of PAD and then raise a ticket with MS support.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • BLabat83 Profile Picture
    122 on at

    Thank you @Agnius.!! I'll let you know any news

  • BLabat83 Profile Picture
    122 on at

    I have already discovered the problem!

    I have configured the error block to continue at the end of the error block when it is executed. I have set it like the second image you see and now it works perfectly in the error handling of the action (continues with the next action in case of error).

    PD1.JPG

    PD2.JPG



    Thanks for your help!

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 791

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 535

Last 30 days Overall leaderboard