I have one API which I integrated with PowerApps application. So what's happening whenever I am running API through application, it is creating resource group and Vm in Azure.
Here the problem is first time when I am calling API in any Powerapps application, it working fine. But when I am running it second time, it is giving me an error - "Getting server returned an http error with code 500"
I followed this link, but got what to do, as it is referring to power automate - https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-handle-a-Server-Error-500-from-callin...
Can someone please help me wit this?
Thanks in advance!!
Hi @Saurabh-704 :
Firstly, considering that it worked normally before, I suggest you delete this formula and add it again, the error should be eliminated.(Or you can consider resetting the app to the previous version)
Seconldy,based on the information you currently provide, I can’t determine what caused the error.
The HyperText Transfer Protocol (HTTP) 500 Internal Server Error server error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.
This error response is a generic "catch-all" response. Usually, this indicates the server cannot find a better 5xx error code to response.
Finally,the solution in the link you provided is not to solve the 500 error, but to go to another branch when an error occurs (return to the default value).
If this problem continues to occur, I suggest you create a support ticket.
Thank you @v-bofeng-msft for your reply. Actually I have one version only. The thing is when I am running that API by clicking on button first time through application, its working fine. When I run second time through same application, It is giving that error. Dont know why?!
I have created 3-4 sample application by for testing, first time that API is working fine, but from second time its giving an error.
Hi @Saurabh-704 ,
Here is my analysis on this.
1. Looks like on your first call it does created the resource group and VM on the first instance.
2. When you call the API again I believe it is passing the same parameter to create the step 1 again. Try changing this to dynamic parameter and see how it works.
3. Also in Azure check whether you any CORS policy available. If so then you need to enable the CORS strictly as you are calling API from PowerAPPS.
But my hunch is you are trying to create the same resource again or there should be a waiting time until your first API call response has return success.
Hope it helps in you some way .
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Hey @Saurabh-704 ,
Did my analysis helped you in some way. If so kindly update the thread and if it is successful please mark my solution as answers. So that other users can get benefit from the thread.
Hey @ragavanrajan Sorry for the late update. Actually the thing is I was passing parameter dynamically only. And I think it was not related to CORS policy, because if it would be related to CORS policy then at first place only it would not allow us to created VM through API in PowerApps.
As per now, when I debug and did some RnD and testing, I was getting error related to quota issue. Like for example per location can have limited no of VM's or resources only. So I thinks thats the reason but then also not sure!
Thank you once again!
Check out new user group experience and if you are a leader please create your group
We are excited to announce that Demo Extravaganza for 2021 has started!
On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks
Did you miss the call? Check out the recording here!