node-attempt
node-attempt copied to clipboard
only retry on certain errors
I don't want to retry every error. So maybe onError
should get a third parameter that could be used like
onError: function(err, done, abort) {
if (err.code === 'ECONNREFUSED') {
done(true);
} else {
abort();
}
}