Skip to content

Commit 7ad2a7a

Browse files
authored
add EHOSTUNREACH to NetworkRetryErrors (microsoft#373)
1 parent 1815244 commit 7ad2a7a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/HttpClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export enum HttpCodes {
4141

4242
const HttpRedirectCodes: number[] = [HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect];
4343
const HttpResponseRetryCodes: number[] = [HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout];
44-
const NetworkRetryErrors: string[] = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED'];
44+
const NetworkRetryErrors: string[] = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH'];
4545
const RetryableHttpVerbs: string[] = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];
4646
const ExponentialBackoffCeiling = 10;
4747
const ExponentialBackoffTimeSlice = 5;

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typed-rest-client",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "Node Rest and Http Clients for use with TypeScript",
55
"main": "./RestClient.js",
66
"scripts": {

0 commit comments

Comments
 (0)