Showing results for 
Search instead for 
Did you mean: 

Error handling inside PowerApps (Try-Catch)

My idea come with error message that is being thrown when trying to get manager of user via Office365 Users connector. More details here -


As this is expected error that will be delivered by this connector it will be nice to have some option inside PowerApps to catch it and instead of displaying this for user of PA as "nothing to say" message, to diplay something like no manager found and this can lead to some other actions ...


Status: Under Review

Sorry, I meant to add this as under review. It has been on our radar to improve this experience. Adding @SameerCh to comment on roadmap.


Thank you for your patience,


Helper I

After many attempts testing different controls, i have found below formula to be successful for me and is no longer spitting out the error if a user(that has no manager) uses the app.


I have tried IfError, IsBlank Not(IsBlank) and all these failed.

The only one that is working for me is IsEmpty.


If(IsEmpty(Office365Users.Manager(_myProfile.Id)), Set(_defaultApprover, Blank()), Set(_defaultApprover, Office365Users.Manager(_myProfile.Id)))


I created a label to display the information of _defaultApprover to show as "No Manager" when _defaultApprover is blank and it does show it as expected and of course users with manager will display their manager name on it.

Frequent Visitor

Yeah everything that worked for me before must have been cached or something because nothing is working for me today.  So frustrating thought I had it working.  Just getting errors.  I will try your idea@isri_zainal

Frequent Visitor

Nothing is working for me today that was working previously. Back to square one. So frustrating.  Come on Microsoft this is obvious stuff.

Frequent Visitor

Hello All,
I've had it working using this.

I set up a couple of On Load variables:
//Define the request
Set(     varRequester,     Text(Office365Users.MyProfileV2().mail) );
//Define the Manager, and use '' if no manager Set(     varApprover,     IfError(         Office365Users.ManagerV2(varRequester).mail,         "",         Office365Users.ManagerV2(varRequester).mail     ) )
The IfError function is new and experimental, so I had to switch on 'Formula-level error management':
Regular Visitor

I have a custom connector that returns 400 HTTP Error statuses. When calling the connector in my PowerApp it comes to an exception, execution is aborted and I am not able to access the HTTP response. Actually, HTTP Errors should not be handled as exceptions but like expected responses. Using a switch statement I then could react based upon the HTTP status. 

Helper I

Same here, I need to be able to handle 4xx HTTP codes being returned when a call to a REST API, using a custom connector, fails. Instead a less-than-useful error message is displayed on the screen. Please implement a try-catch functionality. 

Frequent Visitor

Any news with this topic?

New Member

Bumping this any news? 

Regular Visitor

Why is this not sorted..... there must be a better way to handle if someone doesn't have a manager within and org browser as it'll happen.

Frequent Visitor

Don't panic !

Simple Enable this:
Go to
«Experimental features» section -> Enable «Formula-level error management»

and Use this Formula: IfError(Office365Users.ManagerV2(User().Email).displayName,"");

Was glad to help 😊