Skip to content

Commit

Permalink
Merge branch 'develop' into klaviyo-empty-customprops
Browse files Browse the repository at this point in the history
  • Loading branch information
ujjwal-ab authored Dec 12, 2023
2 parents 8056d46 + bf39215 commit 14f66b2
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/v0/destinations/adobe_analytics/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ const processTrackEvent = (message, adobeEventName, destinationConfig, extras =
const handleTrack = (message, destinationConfig) => {
const ORDER_ID_KEY = 'properties.order_id';
const { event: rawEvent, properties } = message;
if (!rawEvent) {
throw new InstrumentationError('Event name is not present. Aborting message.');
}
let payload = null;
// handle ecommerce events separately
// generic events should go to the default
Expand Down
45 changes: 45 additions & 0 deletions test/integrations/destinations/adobe_analytics/processor/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3057,4 +3057,49 @@ export const data = [
},
},
},
{
name: 'adobe_analytics',
description: 'Test 17: Event is missing for track',
feature: 'processor',
module: 'destination',
version: 'v0',
input: {
request: {
body: [
{
message: {
anonymousId: '78c53c15-32a1-4b65-adac-bec2d7bb8fab',
channel: 'web',
originalTimestamp: '2020-01-09T10:01:53.558Z',
type: 'track',
sentAt: '2020-01-09T10:02:03.257Z',
},
destination: {
Config: {},
},
},
],
method: 'POST',
},
},
output: {
response: {
status: 200,
body: [
{
error: 'Event name is not present. Aborting message.',
statTags: {
destType: 'ADOBE_ANALYTICS',
errorCategory: 'dataValidation',
errorType: 'instrumentation',
feature: 'processor',
implementation: 'native',
module: 'destination',
},
statusCode: 400,
},
],
},
},
},
];

0 comments on commit 14f66b2

Please sign in to comment.