Skip to content

Commit

Permalink
feat: handle ENOTFOUND
Browse files Browse the repository at this point in the history
In some cases you may get this error even if the resource is actually accessible, I'm not sure why, but it happens. Retrying doesn't hurt
  • Loading branch information
FezVrasta authored Jan 3, 2018
1 parent 075f5ce commit 924bc15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ function shouldRetry (err, res, allowedStatuses) {
'ECONNRESET',
'ETIMEDOUT',
'EADDRINFO',
'ESOCKETTIMEDOUT'
'ESOCKETTIMEDOUT',
'ENOTFOUND'
]

if (err && err.code && ~ERROR_CODES.indexOf(err.code)) {
Expand Down

0 comments on commit 924bc15

Please sign in to comment.