chore: add some console logs for debugging (#21130)

* chore: add some console logs for debugging

* chore: log only essential
This commit is contained in:
Udit Takkar
2025-05-09 08:26:12 +00:00
committed by GitHub
parent cecfcc7c6f
commit 0f8356f417
@@ -10,6 +10,7 @@ import generateIcsString from "@calcom/emails/lib/generateIcsString";
import { getCalEventResponses } from "@calcom/features/bookings/lib/getCalEventResponses";
import { getBookerBaseUrl } from "@calcom/lib/getBookerUrl/server";
import logger from "@calcom/lib/logger";
import { safeStringify } from "@calcom/lib/safeStringify";
import { getTranslation } from "@calcom/lib/server/i18n";
import { getTimeFormatStringFromUserTimeFormat } from "@calcom/lib/timeFormat";
import prisma from "@calcom/prisma";
@@ -378,7 +379,14 @@ export async function handler(req: NextRequest) {
});
}
} catch (error) {
logger.error(`Error scheduling Email with error ${error}`);
logger.error(`Error scheduling Email with error ${error}`, {
reminderId: reminder.id,
scheduledDate: reminder.scheduledDate,
isMandatoryReminder: reminder.isMandatoryReminder,
workflowStepId: reminder?.workflowStep?.id,
bookingUid: reminder.booking?.uid,
fullError: safeStringify(error),
});
}
} else if (reminder.isMandatoryReminder) {
try {
@@ -459,7 +467,14 @@ export async function handler(req: NextRequest) {
});
}
} catch (error) {
logger.error(`Error scheduling Email with error ${error}`);
logger.error(`Error scheduling Email with error ${error}`, {
reminderId: reminder.id,
scheduledDate: reminder.scheduledDate,
isMandatoryReminder: reminder.isMandatoryReminder,
workflowStepId: reminder?.workflowStep?.id,
bookingUid: reminder.booking?.uid,
fullError: safeStringify(error),
});
}
}
}