From 3b997e074cf3b132bdf6852df110ecba8047916a Mon Sep 17 00:00:00 2001 From: Jakob Pupke Date: Sat, 14 Sep 2024 11:15:59 +0200 Subject: [PATCH] create less Sentry errors when google calendar fetching fails --- packages/app-store/googlecalendar/lib/CalendarService.ts | 1 - packages/core/CalendarManager.ts | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/app-store/googlecalendar/lib/CalendarService.ts b/packages/app-store/googlecalendar/lib/CalendarService.ts index 72924189d2609a..68bf2c889e151d 100644 --- a/packages/app-store/googlecalendar/lib/CalendarService.ts +++ b/packages/app-store/googlecalendar/lib/CalendarService.ts @@ -62,7 +62,6 @@ export default class GoogleCalendarService implements Calendar { // `Failed to refresh access token for Google Calendar: userId: ${credential.userId}` // ); this.log.error("Error refreshing google token", err); - Sentry.captureException(err); } return myGoogleAuth; }; diff --git a/packages/core/CalendarManager.ts b/packages/core/CalendarManager.ts index ce522ed9dcda62..e268f28e0b320f 100644 --- a/packages/core/CalendarManager.ts +++ b/packages/core/CalendarManager.ts @@ -187,12 +187,17 @@ export const getBusyCalendarTimes = async ( calendars: selectedCalendars, credentials: withCredentials, }); + /** + * Do not send this to Sentry. It's kind of an expected error that happens when a user is leaves Tourlane + * for example but they are still on Calcom. + * Sentry.captureException(error, { extra: { calendars: selectedCalendars, credentials: withCredentials, }, }); + */ } return results.reduce((acc, availability) => acc.concat(availability), []); };