Skip to content

Commit 0f8356f

Browse files
authored
chore: add some console logs for debugging (calcom#21130)
* chore: add some console logs for debugging * chore: log only essential
1 parent cecfcc7 commit 0f8356f

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

packages/features/ee/workflows/api/scheduleEmailReminders.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import generateIcsString from "@calcom/emails/lib/generateIcsString";
1010
import { getCalEventResponses } from "@calcom/features/bookings/lib/getCalEventResponses";
1111
import { getBookerBaseUrl } from "@calcom/lib/getBookerUrl/server";
1212
import logger from "@calcom/lib/logger";
13+
import { safeStringify } from "@calcom/lib/safeStringify";
1314
import { getTranslation } from "@calcom/lib/server/i18n";
1415
import { getTimeFormatStringFromUserTimeFormat } from "@calcom/lib/timeFormat";
1516
import prisma from "@calcom/prisma";
@@ -378,7 +379,14 @@ export async function handler(req: NextRequest) {
378379
});
379380
}
380381
} catch (error) {
381-
logger.error(`Error scheduling Email with error ${error}`);
382+
logger.error(`Error scheduling Email with error ${error}`, {
383+
reminderId: reminder.id,
384+
scheduledDate: reminder.scheduledDate,
385+
isMandatoryReminder: reminder.isMandatoryReminder,
386+
workflowStepId: reminder?.workflowStep?.id,
387+
bookingUid: reminder.booking?.uid,
388+
fullError: safeStringify(error),
389+
});
382390
}
383391
} else if (reminder.isMandatoryReminder) {
384392
try {
@@ -459,7 +467,14 @@ export async function handler(req: NextRequest) {
459467
});
460468
}
461469
} catch (error) {
462-
logger.error(`Error scheduling Email with error ${error}`);
470+
logger.error(`Error scheduling Email with error ${error}`, {
471+
reminderId: reminder.id,
472+
scheduledDate: reminder.scheduledDate,
473+
isMandatoryReminder: reminder.isMandatoryReminder,
474+
workflowStepId: reminder?.workflowStep?.id,
475+
bookingUid: reminder.booking?.uid,
476+
fullError: safeStringify(error),
477+
});
463478
}
464479
}
465480
}

0 commit comments

Comments
 (0)