msgraph-sdk-javascript icon indicating copy to clipboard operation
msgraph-sdk-javascript copied to clipboard

Retry handler should retry on connect timeout

Open Sytten opened this issue 5 years ago • 1 comments

Feature Request

Is your feature request related to a problem? Please describe

Currently the retry handler only rethrows when the underlining request throws: https://github.com/microsoftgraph/msgraph-sdk-javascript/blob/130f3c0e9d329498ef8444d86181255b640d5743/src/middleware/RetryHandler.ts#L176-L189

This means that a connect timeout will not be retried. This happened in production for us the other day.

{ statusCode: -1, code: "FetchError", message: "request to https://graph.microsoft.com/v1.0/me/mailboxSettings failed, reason: connect ETIMEDOUT 40.126.6.114:443", requestId: null, date: {}, body: "FetchError: request to https://graph.microsoft.com/v1.0/me/mailboxSettings failed, reason: connect ETIMEDOUT 40.126.6.114:443" } 

Describe the solution you'd like

The retry middleware should catch the connection timeout and retry.

AB#6270

Sytten avatar Sep 28 '20 14:09 Sytten

The world is imperfect, and so is the network. A retry mechanism should be implemented for failed requests due to network issues. Any updates on this?

I've been facing this issue more frequently lately

melya avatar May 06 '24 08:05 melya