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
polly().handle((err) => {
// TODO: Log error.
// TODO: Log Retry Attempt number and make some decision based on it.
return true;
})
.waitAndRetry([60000, 1800000, 3600000])
.executeForPromise(() => {return this.doDownload();})
The text was updated successfully, but these errors were encountered:
Hi, I can see that would be useful. Right now only the error is provided as the handle() is meant for deciding what errors to retry and which ones not.
I wil be happy to include a PR that adds it as a second parameter object just like is done with some other functions.
letretries=0;polly().handle((err)=>{// TODO: Log error.// TODO: Log Retry Attempt number and make some decision based on it.retries++;if(retries>n){// do something}returntrue;}).waitAndRetry([60000,1800000,3600000]).executeForPromise(()=>{returnthis.doDownload();})
Scenario below:
polly().handle((err) => {
// TODO: Log error.
// TODO: Log Retry Attempt number and make some decision based on it.
return true;
})
.waitAndRetry([60000, 1800000, 3600000])
.executeForPromise(() => {return this.doDownload();})
The text was updated successfully, but these errors were encountered: