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 Apps / Disable the red error ...
Power Apps
Answered

Disable the red error message

(10) ShareShare
ReportReport
Posted on by

I have an app that grabs employee photos, and if the employee does not have a photo the app returns that red error message at the top, a 404 error has occured. Can i disable this error message? I can handle the error fine in the app with the IsBlank funtion, but the message still shows for my end users... How can i disable the message?!

Categories:
I have the same question (0)
  • HelpfulOrangeJ Profile Picture
    12 on at

    It's far more simple then you could imagine, it only took me a month to work out and not sure how it's not documented.

    on App in Tree View 

    Go To OnError which is empty

    and add ""

    HelpfulOrangeJ_0-1690380216991.png

     

  • Community Power Platform Member Profile Picture
    on at

    Thank you that has helped rid me of the those warnings

  • JeffTex Profile Picture
    57 on at

    After posting my previous reply with the Monitor info, it came to my attention that the unhandled error was an additional control dependent on the values that would have been captured in the OnChange action of the ComboBox.

     

    Encapsulating the Text property of that label shown in Monitor as:

    "Observed": "lblCEOselectionInfo.Text",

    resolved the error.  I needed the IfError added to both the ComboBox action as well as the downstream controls dependent on the value.  The label's Text Property is now set as:

    IfError(
     conSelectedCEO.jobTitle & Char(13)&
     conSelectedCEO.department & Char(13) &
     conSelectedCEO.companyName,
     ""
    )
  • JeffTex Profile Picture
    57 on at

    Exactly the path I am finding myself having to take: reduce the functionality and use of the Office365 connector to preserve the User Experience.  It is a shame.   I would rather a global setting that would allow the suppression of ALL Office365 connector error messages.

  • ProgrammerJaDe Profile Picture
    73 on at

    And to my disappointment it worked fine the day I tested and published the app, now a week later the error message is back. I opted to remove the user photo from this app for the time being. I would rather improve their user experience than to troubleshoot this nonstop.

     

    I have a few ideas on more things to test. If I get a solution I'll reply here. 

  • JeffTex Profile Picture
    57 on at

    That's interesting.  Struggling to suppress this error I had the exact same idea to replace that parameter with a global variable (initialized with a valid ID).  I can say for certain that the global variable idea does not work within the context of the OnChange action of a combobox.  I have even gone as far as doing both: attempting to trap the error with IfError and using a global variable:

     

    ComboBox OnChange property

     

    If(
     IsEmpty(comboCEOselection),
     false,
     Set(
     varIDTemp,
     comboCEOselection.Selected.Id
     );
     IfError(
     UpdateContext({conSelectedCEO: Office365Users.UserProfileV2(varIDTemp)}),
     ""
     )
    )

     

     

     Still, every time this app is run the error is seen.  It is so frustrating.

     

    JeffTex_0-1654788786063.png

     

    The detail of the error in Monitor show:

     

    Office365Users.UserProfileV2 failed: The method 'UserProfileV2' has an invalid value for parameter 'id'

     

    {
     "status": null,
     "duration": null,
     "dataSource": null,
     "responseSize": null,
     "controlName": null,
     "propertyName": null,
     "nodeId": null,
     "formulaData": {
     "script": "",
     "spanStart": null,
     "spanEnd": null
     },
     "data": {
     "errorContext": {
     "entityName": "comboCEOselection",
     "propertyName": "OnChange",
     "nodeId": 14,
     "id": 3441,
     "diagnosticContext": {
     "formula": "If(\n IsEmpty(comboCEOselection),\n false,\n Set(\n varIDTemp,\n comboCEOselection.Selected.Id\n );\n IfError(\n UpdateContext({conSelectedCEO: Office365Users.UserProfileV2(varIDTemp)}),\n \"\"\n )\n)",
     "span": {
     "start": 172,
     "end": 211
     }
     }
     },
     "errorMessage": "Office365Users.UserProfileV2 failed: The method 'UserProfileV2' has an invalid value for parameter 'id'",
     "raiseToastNotification": false,
     "wasReported": false,
     "error": {}
     }
    }

     

     

    And:

     

    Unhandled error

     

    {
     "status": null,
     "duration": null,
     "dataSource": null,
     "responseSize": null,
     "controlName": null,
     "propertyName": null,
     "nodeId": null,
     "formulaData": {
     "script": "",
     "spanStart": null,
     "spanEnd": null
     },
     "data": {
     "errors": [
     {
     "Kind": 23,
     "Message": "Office365Users.UserProfileV2 failed: The method 'UserProfileV2' has an invalid value for parameter 'id'",
     "Source": "comboCEOselection.OnChange",
     "Observed": "lblCEOselectionInfo.Text",
     "Details": null
     },
     {
     "Kind": 23,
     "Message": "Office365Users.UserProfileV2 failed: The method 'UserProfileV2' has an invalid value for parameter 'id'",
     "Source": "comboCEOselection.OnChange",
     "Observed": "lblCEOselectionInfo.Text",
     "Details": null
     },
     {
     "Kind": 23,
     "Message": "Office365Users.UserProfileV2 failed: The method 'UserProfileV2' has an invalid value for parameter 'id'",
     "Source": "comboCEOselection.OnChange",
     "Observed": "lblCEOselectionInfo.Text",
     "Details": null
     }
     ]
     }
    }

     

     

     

     

  • ProgrammerJaDe Profile Picture
    73 on at

    New, more simple solution.

     

    This red error message just started showing up for me after working fine for a few months. The fastest solution I came up with was to replace the ThisItem reference with a global variable instead.

     

    When a user clicks on the record in my gallery, I added Set(var_UserImage,ThisItem.'Created By'.Email).  

    When you use Office365Users.UserPhoto with a global variable instead of a record lookup it works just fine. I was able to remove the IsBlank check as well. It just works now.

     

    Office365Users.UserPhoto(var_UserImage)

  • naderhadjebi Profile Picture
    20 on at

    When I try this solution, the image does now show up. 

  • Community Power Platform Member Profile Picture
    on at

    I use this code inside the gallery an it works, 

     

    If(!IsBlank(ThisItem.Id),Office365Users.UserPhotoV2(ThisItem.Id),SampleImage)

  • Community Power Platform Member Profile Picture
    on at

    I use this, an it work fine, in a gallery

     

    If(!IsBlank(ThisItem.Id),IfError(Office365Users.UserPhoto(ThisItem.Id),""),SampleImage)

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 459

#2
WarrenBelz Profile Picture

WarrenBelz 383 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 337 Super User 2025 Season 2

Last 30 days Overall leaderboard