-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add retries for various failure reasons #164
Conversation
RE:
I think it's safe to assume that if there is no |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice 🏁
@@ -11,9 +11,20 @@ const fs = require('fs'); | |||
|
|||
require('dotenv').config(); | |||
|
|||
const RETRY_ERROR_CODES = ['ECONNRESET', 'ECONNREFUSED', 'EPIPE', 'EHOSTUNREACH', 'EAI_AGAIN']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 Nice
predicate: function(err) { | ||
return err.statusCode >= 500 && err.statusCode < 600; | ||
}, | ||
predicate: retryPredicate, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing this codebase does the hanging commas too? Hm, we need a consistent lint guide :p
Have added retries to _httpPost when ECONNRESET is encountered.
Optional Todos: