Provide Better Error Code than 503 on Consistent timeouts

Provide Better Error Code than 503 on Consistent timeouts



 Sep 23 2021

We have an application that uses Microsoft Graph's delta query api.   Our overall use case is that we want the last year/next year of Calendar data for a given user. A very small set of users are seeing 503s with an "Unknown Error" string returned when using this query.

We raised this issue with Microsoft support and they  indicated this is a timeout on the Microsoft side due to too much data for some users and that we should reduce our window and also suggested raising the issue here. [Case #:27172037] 


1) authenticate with O365 using oauth
2) make a request to the API for a delta token that looks something like this:

curl -H "Accept: application/json" -H "Content-Type: application/json" -H 'Authorization: Bearer '"$USER_OAUTH_TOKEN"'' -X GET "" 9`

Again, this type of request succeeds for 99.9% of our users, but will fail reliably for just a few. Normally when the delta token requests succeeds, and we have a delta token, we can page through data and use the data in our system without problems.

We would love to either see this issue resolved so that it works for all users or that failing at least a more reliable and informative error code. As 503s can also happen when there is intermittent internal networking issues, it's difficult to condition logic on this error.