From 1060f910a6cc480a0ad60ec7aede3ed672ffd28c Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Wed, 31 Jan 2024 17:05:48 +0530 Subject: [PATCH] fix: pass status instead of 500 in retryable code --- src/v0/destinations/campaign_manager/networkHandler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/v0/destinations/campaign_manager/networkHandler.js b/src/v0/destinations/campaign_manager/networkHandler.js index a1fa24835c..d7b342afd6 100644 --- a/src/v0/destinations/campaign_manager/networkHandler.js +++ b/src/v0/destinations/campaign_manager/networkHandler.js @@ -54,7 +54,7 @@ const responseHandler = (destinationResponse) => { if (checkIfFailuresAreRetryable(response)) { throw new RetryableError( `Campaign Manager: Retrying during CAMPAIGN_MANAGER response transformation`, - 500, + status, destinationResponse, ); } else { @@ -76,7 +76,7 @@ const responseHandler = (destinationResponse) => { throw new NetworkError( `Campaign Manager: ${response.error?.message} during CAMPAIGN_MANAGER response transformation 3`, - 500, + status, { [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(status), },