From c54dbe5653f4d6086a52b24ac0767893c1ed3378 Mon Sep 17 00:00:00 2001 From: Sai Sankeerth Date: Thu, 5 Sep 2024 15:49:44 +0530 Subject: [PATCH] chore: refactor logic --- src/v0/util/index.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/v0/util/index.js b/src/v0/util/index.js index e401836495..c3b9570bc4 100644 --- a/src/v0/util/index.js +++ b/src/v0/util/index.js @@ -1554,11 +1554,8 @@ const getErrorStatusCode = (error, defaultStatusCode = HTTP_STATUS_CODES.INTERNA function isAxiosError(err) { return ( - !!err?.config && Array.isArray(err?.config?.adapter) && - err?.config?.adapter.length > 1 && - !!err?.request && - !!err?.request?.socket && + err?.config?.adapter?.length > 1 && typeof err?.request?.socket === 'object' && !!err?.request?.protocol && !!err?.request?.method &&