Skip to content

Commit

Permalink
chore: CRM logging, add booking uid (calcom#18256)
Browse files Browse the repository at this point in the history
* Add more logging

* Add conditional
  • Loading branch information
joeauyeung authored and MuhammadAimanSulaiman committed Feb 20, 2025
1 parent 5e5955a commit 09b2bcb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/EventManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ export default class EventManager {
success = false;
// We don't know the type of the error here, so for an Error instance we can read message but otherwise we stringify the error
const errorMsg = error instanceof Error ? error.message : JSON.stringify(error);
log.warn(`Error creating crm event for ${credential.type}`, errorMsg);
log.warn(`Error creating crm event for ${credential.type} for booking ${event?.uid}`, errorMsg);
});

if (createdEvent) {
Expand Down Expand Up @@ -1015,7 +1015,7 @@ export default class EventManager {
const crm = new CrmManager(credential);
const updatedEvent = await crm.updateEvent(reference.uid, event).catch((error) => {
success = false;
log.warn(`Error updating crm event for ${credential.type}`, error);
log.warn(`Error updating crm event for ${credential.type} for booking ${event?.uid}`, error);
});

updatedEvents.push({
Expand Down

0 comments on commit 09b2bcb

Please sign in to comment.