diff --git a/src/v0/destinations/delighted/util.js b/src/v0/destinations/delighted/util.js index 49ec77f314..e976f03a3a 100644 --- a/src/v0/destinations/delighted/util.js +++ b/src/v0/destinations/delighted/util.js @@ -47,7 +47,7 @@ const isValidUserIdOrError = (channel, userId) => { * @returns */ const getErrorStatus = (status) => { - let errStatus = status; + let errStatus; switch (status) { case 422: case 401: @@ -60,7 +60,7 @@ const getErrorStatus = (status) => { errStatus = 500; break; default: - errStatus = 400; + errStatus = status; } return errStatus; }; diff --git a/test/integrations/destinations/delighted/processor/data.ts b/test/integrations/destinations/delighted/processor/data.ts index 20b77aa7ab..225f7ef991 100644 --- a/test/integrations/destinations/delighted/processor/data.ts +++ b/test/integrations/destinations/delighted/processor/data.ts @@ -1022,12 +1022,12 @@ export const data = [ statTags: { destType: 'DELIGHTED', errorCategory: 'network', - errorType: 'aborted', + errorType: 'throttled', feature: 'processor', implementation: 'native', module: 'destination', }, - statusCode: 400, + statusCode: 429, }, ], },