Skip to content

Commit

Permalink
fix: bugsnag issue in braze for processor transformation
Browse files Browse the repository at this point in the history
Signed-off-by: Sai Sankeerth <[email protected]>
  • Loading branch information
Sai Sankeerth committed May 21, 2024
1 parent ffd4958 commit f7afdac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/v0/destinations/braze/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,13 @@ function processAlias(message, destination) {
);
}

async function process(event, processParams = { userStore: new Map() }, reqMetadata = {}) {
async function process(event, reqMetadata = {}, processParams = { userStore: new Map() }) {
let response;
const { message, destination } = event;
const messageType = message.type.toLowerCase();
if (!processParams?.userStore) {
processParams.userStore = new Map();
}

let category = ConfigCategory.DEFAULT;
switch (messageType) {
Expand Down
2 changes: 1 addition & 1 deletion src/v0/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,7 @@ const simpleProcessRouterDestSync = async (inputs, singleTfFunc, reqMetadata, pr
// transform if not already done
if (!input.message.statusCode) {
// eslint-disable-next-line no-await-in-loop
resp = await singleTfFunc(input, processParams, reqMetadata);
resp = await singleTfFunc(input, reqMetadata, processParams);
}
respList.push(getSuccessRespEvents(resp, [input.metadata], input.destination));
} catch (error) {
Expand Down

0 comments on commit f7afdac

Please sign in to comment.