From a1d5e75447f9c343780e8ac42a8e1340c1175848 Mon Sep 17 00:00:00 2001 From: Abhinav-grd Date: Sun, 29 Aug 2021 13:01:48 +0530 Subject: [PATCH] no need to catch and throw error --- src/utils/network/index.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/utils/network/index.ts b/src/utils/network/index.ts index 581263862..e750de954 100644 --- a/src/utils/network/index.ts +++ b/src/utils/network/index.ts @@ -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]);