diff --git a/src/v0/destinations/awin/transform.js b/src/v0/destinations/awin/transform.js index 68dd9d62e1..0e1e220548 100644 --- a/src/v0/destinations/awin/transform.js +++ b/src/v0/destinations/awin/transform.js @@ -3,6 +3,7 @@ const { BASE_URL, ConfigCategory, mappingConfig } = require('./config'); const { defaultRequestConfig, constructPayload, simpleProcessRouterDest } = require('../../util'); const { getParams, trackProduct, populateCustomTransactionProperties } = require('./utils'); +const { FilteredEventsError } = require('../../util/errorTypes'); const responseBuilder = (message, { Config }) => { const { advertiserId, eventsToTrack, customFieldMap } = Config; @@ -33,9 +34,9 @@ const responseBuilder = (message, { Config }) => { ...customTransactionProperties, }; } else { - throw new InstrumentationError( - "Event is not present in 'Events to Track' list. Aborting message.", - 400, + throw new FilteredEventsError( + "Event is not present in 'Events to Track' list. Dropping the event.", + 298, ); } } diff --git a/test/integrations/destinations/awin/data.ts b/test/integrations/destinations/awin/data.ts index 5a7fcfb50f..821b55637e 100644 --- a/test/integrations/destinations/awin/data.ts +++ b/test/integrations/destinations/awin/data.ts @@ -828,16 +828,14 @@ export const data = [ status: 200, body: [ { - error: "Event is not present in 'Events to Track' list. Aborting message.", + error: "Event is not present in 'Events to Track' list. Dropping the event.", statTags: { destType: 'AWIN', - errorCategory: 'dataValidation', - errorType: 'instrumentation', feature: 'processor', implementation: 'native', module: 'destination', }, - statusCode: 400, + statusCode: 298, }, ], },