Skip to content

Commit

Permalink
create less Sentry errors when google calendar fetching fails
Browse files Browse the repository at this point in the history
  • Loading branch information
haffla committed Sep 14, 2024
1 parent 0715324 commit 3b997e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion packages/app-store/googlecalendar/lib/CalendarService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
5 changes: 5 additions & 0 deletions packages/core/CalendarManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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), []);
};
Expand Down

0 comments on commit 3b997e0

Please sign in to comment.