Skip to content

Commit

Permalink
log relevant information when erroring
Browse files Browse the repository at this point in the history
  • Loading branch information
abhimanyubabbar committed Mar 11, 2024
1 parent 8ab4269 commit 0e9ada9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/services/trackingPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,17 @@ export class TrackingPlanservice {
error: JSON.stringify(constructValidationErrors(validatedEvent['validationErrors'])),
};
} catch (error) {
logger.debug(`Error occurred while validating: ${error}`);
logger.debug(

Check warning on line 35 in src/services/trackingPlan.ts

View check run for this annotation

Codecov / codecov/patch

src/services/trackingPlan.ts#L35

Added line #L35 was not covered by tests
`Error occurred while validating event`,
'event',
event?.eventName,
'tp',
event?.trackingPlanId,
'tpVersion',
event?.trackingPlanVersion,
'error',
error,
);

exceptionOccured = true;

Check warning on line 47 in src/services/trackingPlan.ts

View check run for this annotation

Codecov / codecov/patch

src/services/trackingPlan.ts#L47

Added line #L47 was not covered by tests
// no need to process further if
Expand Down

0 comments on commit 0e9ada9

Please sign in to comment.