Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: final review issues #1699

Merged
merged 2 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/v0/destinations/active_campaign/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,14 +558,14 @@ const trackRequestHandler = async (message, category, destination) => {
}
};
res = await httpPOST(endpoint, requestData, requestOpt);
if (res?.response?.status !== 201) {
if (res.response?.status !== 201) {
throw new NetworkError(
"Unable to create event. Aborting",
res.response.status,
{
[tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(res.response.status)
},
res?.response
res.response
);
}
}
Expand Down
8 changes: 2 additions & 6 deletions src/v0/destinations/clickup/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ const {
formatTimeStamp
} = require("../../util");
const { getCustomFieldsEndPoint } = require("./config");
const {
NetworkError,
InstrumentationError,
ConfigurationError
} = require("../../util/errorTypes");
const { NetworkError, InstrumentationError } = require("../../util/errorTypes");
const tags = require("../../util/tags");

/**
Expand Down Expand Up @@ -344,7 +340,7 @@ const checkEventIfUIMapped = (message, destination) => {
whiteListedEvent.eventName.toLowerCase() === event.toLowerCase()
);
if (!allowEvent) {
throw new ConfigurationError(
throw new InstrumentationError(
"The event was discarded as it was not allow listed in the destination configuration"
);
}
Expand Down
6 changes: 3 additions & 3 deletions src/versionedRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -1146,9 +1146,9 @@ const batchHandler = ctx => {
});
const errResp = getErrorRespEvents(
destEvents.map(d => d.metadata),
500,
error.message || "Error occurred while processing payload.",
{ errorAt: tags.FEATURES.BATCH, ...errorObj.statTags }
500, // not using errorObj.status
errorObj.message,
errorObj.statTags
);
response.errors.push(errResp);
errNotificationClient.notify(error, "Batch Transformation", {
Expand Down