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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Scope result for error...
Power Automate
Unanswered

Scope result for error handling does not display what failed

(1) ShareShare
ReportReport
Posted on by 2,563

Hi

 

I have the following setup.

Scope 1: Contains a condition and multiple other functions.

Scope2: Runs is Scope 1 failed, I want to collect what failed in Scope 1.

 

In Scope2 I have a compose = result('Scope1)

But I don't receive what actually failed in Scope1 instead I just get this.
Basically I only see that something failed in the Scope, but I want the error message of the function that actually failed in Scope1

[
 {
 "name": "Scope1",
 "inputs": {
 "expressionResult": true
 },
 "startTime": "2022-03-22T10:37:56.9942523Z",
 "endTime": "2022-03-22T10:37:57.6817615Z",
 "trackingId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
 "clientTrackingId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
 "clientKeywords": [
 "testFlow"
 ],
 "code": "ActionFailed",
 "status": "Failed",
 "error": {
 "code": "ActionFailed",
 "message": "An action failed. No dependent actions succeeded."
 }
 }

 

Categories:
I have the same question (0)
  • fchopo Profile Picture
    8,003 Moderator on at

    Hi @JimmyWork 

    As I understand, you're executing scope 2 when scope 1 failed or timed out, for instance, right? Using Result('Scope1") should return more information than the provided... Could you try to add the following to the "Scope2" ?:

    image-6

     

    This comes from an excellent blog post by @TomaszPoszytek for error handling: Try-Catch pattern in Microsoft Flow • Tomasz Poszytek, Business Applications MVP

    Hope it helps!

    Ferran

  • JimmyW Profile Picture
    2,563 on at

    @fchopo Thank you for answering but I'm not sure how to proceed I don't create a JSON or run a for each, because only one thing will fail then the rest is stopped so I would like to catch the error of the first thing that fails inside of Scope1.

    But my Scope1 output only contains what I posted.

    Scope2.

    JimmyWork_0-1647957502473.png

     

    This is what I'm doing.

    https://www.richardawilson.com/2021/06/return-error-in-power-automate-when.html

  • fchopo Profile Picture
    8,003 Moderator on at

    Hi @JimmyWork 

    Could you share what are you doing in Scope1?

    Regards,

    Ferran

  • JimmyW Profile Picture
    2,563 on at

    Wondering if it's because I'm using a condition inside of Scope1, and maybe that is why I'm getting a generic error message?

  • JimmyW Profile Picture
    2,563 on at

    Scope 1

    JimmyWork_1-1647960068751.png

    Scope2

    JimmyWork_2-1647960109584.png

     

     

  • fchopo Profile Picture
    8,003 Moderator on at

    Hi @JimmyWork 

    Honestly, everything seems fine, so I don't understand why you're not receiving error details. Can you try forcing an error (for instance, deleting the excel file you're reading in the yes branch?)

    Regards,

    Ferran

  • JimmyW Profile Picture
    2,563 on at

    @fchopo I'm forcing the error on Get Attachment and i can see it errors out and I can read the error in the flow but the data output I get from the scope is a general error message only

  • JimmyW Profile Picture
    2,563 on at

    Bump

  • JimmyW Profile Picture
    2,563 on at

    This issue can be replicated, if you put a condition inside a scope you will only be able to get the general error message. Without any condition inside the scope you get the error message for the part that is failing

  • JimmyW Profile Picture
    2,563 on at

    If you put a scope inside the condition on the Yes or No part you get the full results. But this is not a good option for me as I then need to get both the Yes and the No scope inside the condition.

     

    Can I somehow reference the Condition and get the result from the Condition instead of the Scope?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard