Skip to content

Commit 8a27404

Browse files
author
Bcornish
committed
feat(slots): add observability to guest-busy-times degradation path
The catch arm in _getGuestBusyTimesForReschedule silently returned [] on any failure to keep rescheduling unblocked. That is the right runtime behaviour, but a silent swallow makes upstream regressions (e.g. a Prisma schema drift in BookingRepository.findByUidIncludeAttendeeEmails) look like 'no Cal.com guests found' rather than a real fault. Emit a structured warn through the existing slots/util logger so operators can detect this without paging on a non-blocking code path. Uses safeStringify (already imported and used elsewhere in this file) so the error never breaks the log line.
1 parent 5dc781f commit 8a27404

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • packages/trpc/server/routers/viewer/slots

packages/trpc/server/routers/viewer/slots/util.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,13 @@ export class AvailableSlotsService {
887887

888888
return guestBookings.map((b) => ({ start: b.startTime, end: b.endTime }));
889889
} catch (error) {
890-
// Graceful degradation: never block rescheduling if guest lookup fails
890+
// Graceful degradation: never block rescheduling if guest lookup fails.
891+
// Log at warn (not error) so operators can detect upstream regressions
892+
// without paging on a non-blocking code path.
893+
log.warn(
894+
"[getGuestBusyTimesForReschedule] degraded to empty result",
895+
safeStringify({ rescheduleUid, error })
896+
);
891897
return [];
892898
}
893899
}

0 commit comments

Comments
 (0)