cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MRTG
Frequent Visitor

Capture further error details

There are many articles on how to capture a submission failure which can be used to display to users.
This is done by reading Errors(TableName) and returns something like attached Image1;

MRTG_0-1635326913368.png

 

When viewing in 'Edit Mode' of PowerApps, I am able to get more detail which is important to this scenario. See Image2, error for same image above

MRTG_0-1635327022256.png

 

 

How can I capture the 'Server Response' as per the last image?

 

3 REPLIES 3

@MRTG You can turn on the experimental feature 

" Formula-level error management "

 

Then use the IfError, IsError, IsBlankOrError functions from PowerApps to check if an Error has happened, and handle the error such as to display it. More details here: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-iferror

 

For the actual message, access the FirstError.Message property to know what the error message was.
Example: 

 

IfError( SomeErrorGeneratingFormula, Notify( FirstError.Message ) ) 

 


You may also be interested in the FirstError.Kind, Source, Observed - and for multiple errors that occur you may be interested in accessing the AllErrors Table. 
More info on this: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-iferror#firsterror--... 

 

 

Check if above helps @MRTG 

Hi,

 

Thanks for that. The problem I have raised is that the formula you quote does not return the full server response. Your formula just returns what you see in the first image, I want to retreive the full reposnse.

GraysonBishop2
Frequent Visitor

@MRTG, I'm running into this exact same issue (for me it is when I'm using Patch with SharePoint). All I can pull from the Error table is "The requested operation is invalid" or, if I have Formula-level error management enabled, I get "Network error when using patch function: The requested operation is invalid". But neither of these responses include the full server response I can see in the Power Apps Studio.

 

I've noticed that in some apps, when Forumla-level error management is disabled, the full error message with the server response is displayed to the user. But I can't figure out when that shows vs when it doesn't so I can't even bank on that.

 

I would love to hear any ideas on how to capture/control this server response part of the error.

 

I made a related post in the Error Handling thread in case there was better engagement there - https://powerusers.microsoft.com/t5/Error-Handling/Capture-Server-Response-Part-of-Error/m-p/1482156.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (5,491)