Skip to content

Commit

Permalink
chore: update error messages of GAOC (#2655)
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsSudip authored Sep 29, 2023
1 parent 5dade9a commit 56c80f2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ const trackResponseBuilder = (message, metadata, destination) => {

const responseList = [];
if (!eventsToConversionsNamesMapping[event] || !eventsToOfflineConversionsTypeMapping[event]) {
throw new ConfigurationError(`Event name '${event}' is not valid`);
throw new ConfigurationError(
`Event name '${event}' is not present in the mapping provided in the dashboard.`,
);
}
const conversionTypes = Array.from(eventsToOfflineConversionsTypeMapping[event]);
conversionTypes.forEach((conversionType) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ const getConversionActionId = async (headers, params) => {
'response.0.results.0.conversionAction.resourceName',
);
if (!conversionAction) {
throw new AbortedError(`Unable to find conversionActionId for conversion:${params.event}`);
throw new AbortedError(
`Unable to find conversionActionId for conversion:${params.event}. Most probably the conversion name in Google dashboard and Rudderstack dashboard are not same.`,
);
}
return conversionAction;
});
Expand Down Expand Up @@ -172,7 +174,7 @@ const requestBuilder = (
const filteredLoginCustomerId = removeHyphens(loginCustomerId);
response.headers['login-customer-id'] = filteredLoginCustomerId;
} else {
throw new ConfigurationError(`loginCustomerId is required as subAccount is enabled`);
throw new ConfigurationError(`"Login Customer ID" is required as "Sub Account" is enabled`);
}
}
return response;
Expand Down
4 changes: 2 additions & 2 deletions test/__tests__/data/google_adwords_offline_conversions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1622,7 +1622,7 @@
}
},
"statusCode": 400,
"error": "Event name 'purchase' is not valid",
"error": "Event name 'purchase' is not present in the mapping provided in the dashboard.",
"statTags": {
"destination": "google_adwords_offline_conversions",
"stage": "transform",
Expand Down Expand Up @@ -2948,7 +2948,7 @@
"secret": null
},
"statusCode": 400,
"error": "loginCustomerId is required as subAccount is enabled",
"error": "\"Login Customer ID\" is required as \"Sub Account\" is enabled",
"statTags": {
"destination": "google_adwords_offline_conversions",
"stage": "transform",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@
],
"batched": false,
"statusCode": 400,
"error": "Event name 'order completed' is not valid",
"error": "Event name 'order completed' is not present in the mapping provided in the dashboard.",
"statTags": { "errorCategory": "dataValidation", "errorType": "configuration" },
"destination": {
"Config": {
Expand Down

0 comments on commit 56c80f2

Please sign in to comment.