Skip to content

Commit

Permalink
Added EHOSTUNREACH
Browse files Browse the repository at this point in the history
  • Loading branch information
FGRibreau committed Sep 23, 2014
1 parent c0f3b97 commit d29c41f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![npm](https://nodei.co/npm/requestretry.png)](https://npmjs.org/package/requestretry)

When the connection fails with one of `ECONNRESET`, `ENOTFOUND`, `ESOCKETTIMEDOUT`, `ETIMEDOUT`, `ECONNREFUSED` or when an HTTP 5xx error occurrs, the request will automatically be re-attempted as these are often recoverable errors and will go away on retry.
When the connection fails with one of `ECONNRESET`, `ENOTFOUND`, `ESOCKETTIMEDOUT`, `ETIMEDOUT`, `ECONNREFUSED`, `EHOSTUNREACH` or when an HTTP 5xx error occurrs, the request will automatically be re-attempted as these are often recoverable errors and will go away on retry.

## Usage

Expand Down Expand Up @@ -37,6 +37,10 @@ Install with [npm](https://npmjs.org/package/requestretry).

## Changelog

v1.0.3

- added `EHOSTUNREACH`

v1.0.2

- upgraded `request` to 2.44.0 (19/09/2014)
Expand All @@ -46,7 +50,12 @@ v1.0.1:

- added `cancelable` as deps

v1.0.0: request now yield an Request instance with a `.abort()` method.
v0.0.1: Initial commit
v1.0.0:

- request now yield an Request instance with a `.abort()` method.

v0.0.1

- initial commit

Copyright 2014, [Francois-Guillaume Ribreau](http://fgribreau.com) (npm@fgribreau.com)
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var request = require('request');
var _ = require('fg-lodash');
var Cancelable = require('cancelable');

var RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED'];
var RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH'];

var DEFAULTS = {
maxAttempts: 5, // try 5 times
Expand Down

0 comments on commit d29c41f

Please sign in to comment.