@@ -10,6 +10,7 @@ import generateIcsString from "@calcom/emails/lib/generateIcsString";
1010import { getCalEventResponses } from "@calcom/features/bookings/lib/getCalEventResponses" ;
1111import { getBookerBaseUrl } from "@calcom/lib/getBookerUrl/server" ;
1212import logger from "@calcom/lib/logger" ;
13+ import { safeStringify } from "@calcom/lib/safeStringify" ;
1314import { getTranslation } from "@calcom/lib/server/i18n" ;
1415import { getTimeFormatStringFromUserTimeFormat } from "@calcom/lib/timeFormat" ;
1516import 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