chore: CRM logging, add booking uid (#18256)
* Add more logging * Add conditional
This commit is contained in:
@@ -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) {
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user