You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did q quick search and didn't find similar issue... It would be useful to have retry and retryable accept an optional errorFilter sync function that will only allow the retry to continue if the function returns true. for example something like:
var retryOpts = {
errorFilter: function (err) {
if(err.code === 11) return true; // only retry for error code 11
return false;
}
};
async.retry(retryOpts, apiMethod, function(err, result) {
// We know that we retried on error code 11, with other retry options being the defaults.
// if we got any other error we immediately bailed to here
if(err) console.log(err);
console.log(result);
});
This could be done in backwards compatible manner. Opinions? Would this be something accepted? I could probably try and do a PR sometime next week if so.
Thanks,
Bojan
The text was updated successfully, but these errors were encountered:
Sounds good. When we added the interval function, we also wanted to add a way to handle errors differently, but couldn't think of a good way to expose that in the API. This seems like a good way to do it.
Hello,
I did q quick search and didn't find similar issue... It would be useful to have
retry
andretryable
accept an optionalerrorFilter
sync function that will only allow the retry to continue if the function returnstrue
. for example something like:This could be done in backwards compatible manner. Opinions? Would this be something accepted? I could probably try and do a PR sometime next week if so.
Thanks,
Bojan
The text was updated successfully, but these errors were encountered: