Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Retry handler should retry on connect timeout #330

Copy link
Copy link
@Sytten

Description

@Sytten
Issue body actions

Feature Request

Is your feature request related to a problem? Please describe

Currently the retry handler only rethrows when the underlining request throws:

try {
await this.nextMiddleware.execute(context);
if (retryAttempts < options.maxRetries && this.isRetry(context.response) && this.isBuffered(context.request, context.options) && options.shouldRetry(options.delay, retryAttempts, context.request, context.options, context.response)) {
++retryAttempts;
setRequestHeader(context.request, context.options, RetryHandler.RETRY_ATTEMPT_HEADER, retryAttempts.toString());
const delay = this.getDelay(context.response, retryAttempts, options.delay);
await this.sleep(delay);
return await this.executeWithRetry(context, retryAttempts, options);
} else {
return;
}
} catch (error) {
throw error;
}

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

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.