An Azure service that provides streamlined full-stack web app development.
Hi MLU,
The behavior you described does point away from the individual function handler, but I would not treat the x-ms-middleware-request-id header by itself as proof that the failure occurs before Functions invocation.
One useful next diagnostic is to check the Static Web App's FunctionHits and FunctionErrors metrics while reproducing a single failed request. Azure Static Web Apps exposes both metrics specifically for managed APIs. Microsoft documents these under Supported metrics for managed Functions in Azure Static Web Apps.
Open the Static Web App, go to Monitoring > Metrics, select FunctionHits and FunctionErrors, then send one request to a known minimal /api/... endpoint.
If FunctionHits increments, the managed Functions backend is seeing the request. At that point, Microsoft documents Application Insights as the supported mechanism for obtaining request, failure, and trace details for managed Functions.
If FunctionHits does not increment even though /api/* immediately returns the blank 500, or if the Static Web App continues to report Application Insights as "not applicable", that is significant because it suggests the problem is with the managed API integration/provisioning rather than an exception in your JavaScript handler. The managed Function App itself is service-managed, so you do not have the same host-level diagnostic access that you would have with a standalone Function App.
Node.js 22 is currently a supported managed-Functions runtime, so Node 22 alone is not an unsupported configuration. If this answer helps accept it.