Skip to content

Commit

Permalink
chore: improve error message for HS (#2576)
Browse files Browse the repository at this point in the history
chore: improce error message for HS
  • Loading branch information
yashasvibajpai authored Sep 11, 2023
1 parent b3c328e commit c1f9d31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/v0/destinations/hs/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,9 @@ const getEventAndPropertiesFromConfig = (message, destination, payload) => {
});

if (!hubspotEventFound) {
throw new ConfigurationError(`'${event}' event name not found`);
throw new ConfigurationError(
`Event name '${event}' mappings are not configured in the destination`,
);
}

// 2. fetch event properties from webapp config
Expand Down
2 changes: 1 addition & 1 deletion test/__tests__/data/hs_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@
},
{
"statusCode": 400,
"error": "'temp event' event name not found"
"error": "Event name 'temp event' mappings are not configured in the destination"
},
{
"statusCode": 400,
Expand Down

0 comments on commit c1f9d31

Please sign in to comment.