Graph API/SDK Bad Gateway 502
We use the Graph API to hit SharePoint Libraries and Lists and occasionally run into BadGateway (502) response codes from the Graph Client SDK and API. I believe that the SDK is supposed to retry if the status code is ServiceUnavailable, GatewayTimeout, or 429. This is returning a BadGateway though. If I attempt to retry, eventually it goes through. This 502 response seems to happen if the request takes longer than 40 seconds to respond. I'm looking for information on what causes this issue and any solutions that can implement to avoid this in the future. There was a period of 12 hours several weeks ago where all we got were 502 responses for any Drives or Sites Graph requests.
@Jon Tereba , you could try to test the api call in Graph explorer or postman, check if the same issue happens.
Sign in to comment
Thanks for the suggestion. Yes, we tried both Postman and Graph Explorer and got the Bad Gateway (502) response in both.
I have the same issue. Working on software that makes many calls, hundreds succeed but eventually I get BadGateway as well. Same call works fine in postman and powershell, fails on different calls each time.