no need to catch and throw error
This commit is contained in:
parent
28ccf3d11c
commit
a1d5e75447
|
@ -15,11 +15,7 @@ export async function retryAsyncFunction(
|
||||||
return resp;
|
return resp;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (checkForBreakingError) {
|
if (checkForBreakingError) {
|
||||||
try {
|
|
||||||
checkForBreakingError(e);
|
checkForBreakingError(e);
|
||||||
} catch (err) {
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (attemptNumber < retrySleepTimeInMilliSeconds.length) {
|
if (attemptNumber < retrySleepTimeInMilliSeconds.length) {
|
||||||
await sleep(retrySleepTimeInMilliSeconds[attemptNumber]);
|
await sleep(retrySleepTimeInMilliSeconds[attemptNumber]);
|
||||||
|
|
Loading…
Reference in a new issue