Skip to content

Commit 7df0fff

Browse files
refactor: simplify error handling in retryResponseErrorHandler
1 parent 894a017 commit 7df0fff

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/lib/retryPolicy/delivery-sdk-handlers.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,7 @@ export const retryResponseErrorHandler = (error: any, config: any, axiosInstance
9393
return retry(error, config, retryCount, config.retryDelay, axiosInstance);
9494
}
9595

96-
const customError = {
97-
status: response.status,
98-
statusText: response.statusText,
99-
error_message: response.data.error_message,
100-
error_code: response.data.error_code,
101-
errors: response.data.errors,
102-
};
103-
104-
throw customError;
96+
throw error;
10597
} catch (err) {
10698
throw err;
10799
}

0 commit comments

Comments
 (0)