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;
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
How can I capture the 'Server Response' as per the last image?
@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.
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
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.
@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.
Join us for the next call on August 17, 2022 at 8am PDT.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.