I have a user who has access to the Power App but no read permissions to certain lists.
As soon as the user opens a screen that attempts to load data through the SharePoint connection and collections, the following errors occur:
"Error when attempting to retrieve data from the network: X failed. The response is not in JSON format."
How can I best resolve this?
Hi @AH92
For the App, there will be a Property named "OnError". Start by adding the following code to the "OnError",
Notify(
Concatenate(
FirstError.Message,
", Observed: ",
FirstError.Observed,
", Source: ",
FirstError.Source
),
NotificationType.Error
);
Trace(
"Unhandled Error",
TraceSeverity.Error,
{
Kind: FirstError.Kind,
Message: FirstError.Message,
Observed: FirstError.Observed,
Screen: App.ActiveScreen.Name,
Source: FirstError.Source,
User: User().Email
}
)
This code was taken from the blog post by @mdevaney
This can give you more details on the error. From there base on the "FirstError.Source" value, you could set a variable for Showing/Hiding the Edit form on a Screen and instead displaying a more friendly message that the user does not have access.
-Mark
If this helped you get to a solution, please click on Accept as Solution below.
Yes, something like that. How can I catch this error?
Hi @AH92
Are you looking to display a prettier error message? Or something else? For example, do you want to supports the Error that is showing and instead show a label on the form that says "You do not have Permission to view this form"?
I am trying to figure out what you are looing for to better answer your question.
-Mark
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2