no need to catch and throw error

This commit is contained in:
Abhinav-grd 2021-08-29 13:01:48 +05:30
parent 28ccf3d11c
commit a1d5e75447

View file

@ -15,11 +15,7 @@ export async function retryAsyncFunction(
return resp;
} catch (e) {
if (checkForBreakingError) {
try {
checkForBreakingError(e);
} catch (err) {
throw e;
}
checkForBreakingError(e);
}
if (attemptNumber < retrySleepTimeInMilliSeconds.length) {
await sleep(retrySleepTimeInMilliSeconds[attemptNumber]);