Skip to content

Commit

Permalink
Merge pull request #1 from bhml/bugfix
Browse files Browse the repository at this point in the history
fix retry check for status 4XX
  • Loading branch information
gwilymhumphreys committed Dec 15, 2016
2 parents 136d657 + 3608353 commit 78d8e66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/request.js
Expand Up @@ -38,10 +38,10 @@ const defaults = {
},
check: (err, count) => {
const status = err.status
if (status && status.toString()[0] === 4 || status === 500) return true
if (status && status.toString()[0] === '4' || status === 500) return true
if (err.toString().match(/status (4|500)/)) return true
return false
}
},
}

// Wrap the end function to place the error status code on it if not present
Expand Down

0 comments on commit 78d8e66

Please sign in to comment.