From f6b66073e4676501434fb5afdde17bfef5caddcf Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Thu, 7 Mar 2024 17:23:09 +0530 Subject: [PATCH] fix: lint fixed --- src/v1/destinations/algolia/networkHandler.js | 18 ++++++++---------- .../destinations/salesforce/network.ts | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/v1/destinations/algolia/networkHandler.js b/src/v1/destinations/algolia/networkHandler.js index 6cd8d81c2a..d953251050 100644 --- a/src/v1/destinations/algolia/networkHandler.js +++ b/src/v1/destinations/algolia/networkHandler.js @@ -50,19 +50,17 @@ const responseHandler = (responseParams) => { metadata, error: errorMessage, }); - continue; + } else { + serverStatus = 500; + metadata.dontBatch = true; + responseWithIndividualEvents.push({ + statusCode: 500, + metadata, + error: errorMessage, + }); } - serverStatus = 500; - metadata.dontBatch = true; - responseWithIndividualEvents.push({ - statusCode: 500, - metadata, - error: errorMessage, - }); } - // 400 ... 500 ...not going through individual status - // sending back 500 for retry throw new TransformerProxyError( `ALGOLIA: Error transformer proxy v1 during ALGOLIA response transformation`, diff --git a/test/integrations/destinations/salesforce/network.ts b/test/integrations/destinations/salesforce/network.ts index 93013cd8db..b422271d36 100644 --- a/test/integrations/destinations/salesforce/network.ts +++ b/test/integrations/destinations/salesforce/network.ts @@ -466,5 +466,5 @@ export const networkCallsData = [ ...tfProxyMocksData, ...transformationMocksData, ...businessMockData, - ...otherMocksData + ...otherMocksData, ];