web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Getting error message ...
Power Apps
Answered

Getting error message when the power app page is published but there is no error when ran from power app studio

(0) ShareShare
ReportReport
Posted on by 36

Hi All,

    I have a power app page where I have the following code

 

If(
 IsError(
 CustomerConnectorFunc.SaveSyncConfig(
 {
 code: LookUp(
 'Environment Variable Values',
 'Environment Variable Definition'.'Display Name' = "Save Sync Config Function Key"
 ).Value,
 partitionKey: "US",
 ClientId: tbx_ClientId.Value,
 ClientSecret: tbx_ClientSecret.Value,
 CRMUrl: tbx_CrmUrl.Value,
 WebApi: tbx_WebAPIUrl.Value,
 WebAPIUrl: tbx_WebAPIUrl.Value,
 OrganizationId: tbx_OrgId.Value,
 TenantId: tbx_TenantId.Value
 }
 )
 ),
 Notify(
 "Error while saving the details to Service.Please try again later.",
 Error
 ),
 Notify(
 "Details saved successfully!",
 Success
 )
 )

 

Here, the CustomConnectorFunc is a custom connector that calls an Azure Function. The Azure function returns HTTP status ok on success otherwise a 500 Error status. When I am running this page from power app studio and I hit the save button, the function executes appropriately giving a success message. When I run this page from the published app in the same environment, this gives the error message shown in the above code. But at the same time the API call is successful as I can see the azure function is returning an HTTP status ok. I tried adding application insight to the page - but that did not show any error. Any help would be appreciated. 

Categories:
I have the same question (0)
  • Tiklu Ganguly Profile Picture
    36 on at

    So in simple, when I am running the code by pressing the play button from the power apps studio the application is running as expected and not going to an error condition in the IsError formula. But when the app is published and running in the same environment, it goes to the error condition. 

     

  • Verified answer
    Tiklu Ganguly Profile Picture
    36 on at

    Ok, apparently the code was behaving this oddly as it is expected from the custom connector to either return a boolean value or a JSON object. Now my function was doing none of those. Once I changed the function the problem went away

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 617

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard