502 Bad Gateway
Situations in the vault where SharePoint, SPFx, Microsoft Graph or the Azure services around them answer with HTTP 502. Each one explains why it happens and how to fix it.
- The best-known public API may be the worst one — measure before you build on itgotchas / azure-functionsThe best-known free API returned 404/502/timeout on 7 of 8 live calls while the test suite stayed green; probe latency and status on real data, then cache successes (never failures) and honour Retry-After — a Function…
- Retry only fast failures — a gateway error after 230 seconds is a timeout, not a hiccupgotchas / azure-functionsThe 502/503/504 a client rightly retries for transient failures also comes back when a request ran out of time (Azure Load Balancer returns 502 after 230 s), and retrying that multiplies the wait (3 × ~230 s) and the…