Skip to content

Commit

Permalink
fix: making error statement better
Browse files Browse the repository at this point in the history
  • Loading branch information
shrouti1507 committed Jan 30, 2024
1 parent 67ac4bb commit d7d6bfb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ describe('checkEventStatusViaSchemaMatching', () => {
const result = checkEventStatusViaSchemaMatching(event, fieldSchemaMapping);

expect(result).toEqual({
job1: 'invalid email',
job1: 'invalid email for value 123 ',
});
});

Expand Down Expand Up @@ -448,8 +448,8 @@ describe('checkEventStatusViaSchemaMatching', () => {
const result = checkEventStatusViaSchemaMatching(event, fieldSchemaMapping);

expect(result).toEqual({
job1: 'invalid id',
job2: 'invalid testCustomFieldScore',
job1: 'invalid id for value value1 ',
job2: 'invalid testCustomFieldScore for value false ',
});
});

Expand Down Expand Up @@ -505,7 +505,7 @@ describe('checkEventStatusViaSchemaMatching', () => {
const result = checkEventStatusViaSchemaMatching(event, fieldSchemaMapping);

expect(result).toEqual({
job1: 'invalid abc',
job1: 'invalid abc for value value2 ',
});
});

Expand Down Expand Up @@ -534,7 +534,7 @@ describe('checkEventStatusViaSchemaMatching', () => {
const result = checkEventStatusViaSchemaMatching(event, fieldSchemaMapping);

expect(result).toEqual({
job1: 'invalid id',
job1: 'invalid id for value null ',
});
});
});
2 changes: 1 addition & 1 deletion src/v0/destinations/marketo_bulk_upload/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ const checkEventStatusViaSchemaMatching = (event, fieldMap) => {
const actualDataType = typeof paramValue;

if (!mismatchedFields[job_id] && actualDataType !== expectedDataType) {
mismatchedFields[job_id] = `invalid ${paramName}`;
mismatchedFields[job_id] = `invalid ${paramName} for value ${paramValue} `;
}
});
});
Expand Down

0 comments on commit d7d6bfb

Please sign in to comment.