An Azure service that provides streamlined full-stack web app development.
Hello @MLU
Based on what you've already tested, I agree this doesn't look like a normal CORS, application-setting, or function-code failure. If even a minimal HTTP function returning a hardcoded 200 produces an empty 500 without the function being invoked, the failure is likely occurring before your handler executes.
One clarification: Do not try to force Node.js 18. Node 18 reached end of support for Azure Static Web Apps managed APIs on May 31, 2025. The currently supported Node runtimes are Node 20 and Node 22.
You can explicitly select the managed API runtime in staticwebapp.config.json:
{
"platform": {
"apiRuntime": "node:20"
}
}
platform.apiRuntime is the supported way to select the runtime for managed Functions.
One thing worth checking carefully is where that file ends up after the frontend build. When there is a build step, staticwebapp.config.json must be copied to the root of the deployed output_location. Otherwise, the deployment can succeed while the platform configuration you expect isn't actually being applied.
Therefore, test node:20, confirm from the GitHub Actions output/artifact that staticwebapp.config.json is present in the deployed output root, and redeploy.
Also enable Application Insights on the Static Web App if you haven't already. Application Insights is the logging mechanism for managed Functions. If /api/* still returns an empty 500 and no function invocation appears there, that's useful evidence that the request is failing in the managed API/runtime layer before your code executes.
Since you already have support request 2609160040009134, I'd add the Node 20 test and the absence of any Function invocation/telemetry to that case. If the same minimal function fails after explicitly selecting a supported runtime, don't keep changing the application code. The managed API deployment/runtime needs investigation.
References:
Configure Azure Static Web Apps - API runtime
API support in Azure Static Web Apps with Azure Functions
Static Web Apps build configuration
Help make this community better for everyone: If this answer helped or resolved your issue, please accept it or upvote it. If not, share more details in a comment so we can continue the discussion and find the right solution. Thank you.