I Currently have a static web app deployed in Azure which is operating fine, however, I am seeing issues with the app making requests to the "API" Azure Function App.
Currently my Azure Function App is on the Api folder in the root of my GitHub repo, next to my Blazor static web app.
When i set the YAML app_location to API, then it properly locates my Azure Function and it displays as Managed in the APIs tab of my Azure Static Web App. However, when the web app makes the request to the function, it shows as pending and eventually after 45 seconds, returns with a 500 error.
I since have read that app_location needs to be set to empty string, so I have done made this YAML adjustment in github, though, now the APIs tab does not show any managed function and when my static blazor app makes an http request to the function, it returns with 502 error immediately...
502 - Web server received an invalid response while acting as a gateway or proxy server.
Will you please advise on
- Is the Azure Functions project OK to be in API folder within the root of my repo?
- Why is there no response from the function when i set the app_location to API, but the static web app service in Azure has located my managed function ?
EDIT: Sometimes the backend call is "Pending" then returns a 500 with message "Backend call failure"
Keep in mind all of this works on my local :)