Skip to content

Commit

Permalink
Add logging to retryable GCal service methods
Browse files Browse the repository at this point in the history
  • Loading branch information
balysv committed Nov 15, 2021
1 parent 6a01b2f commit 0bf52bf
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ class SyncGoogleCalendarService(
)
events.toDomain(account, PRIMARY_CALENDAR_ID, timeZone)
} catch (e: Exception) {
logger.error("GoogleCalendarService#forceLoadCalendarEvents", e)
throw translatedGoogleException(e)
}

Expand Down Expand Up @@ -212,6 +213,7 @@ class SyncGoogleCalendarService(
googleCalendarSyncer.syncUserCalendar(primaryAccountId, calendarId)
return true
} catch (e: Exception) {
logger.error("GoogleCalendarService#insertEvent", e)
throw translatedGoogleException(e)
}
}
Expand All @@ -231,6 +233,7 @@ class SyncGoogleCalendarService(
calendarService.events().delete(calendarId, command.eventId).execute()
return true
} catch (e: Exception) {
logger.error("GoogleCalendarService#deleteEvent", e)
throw translatedGoogleException(e)
}
}
Expand All @@ -256,6 +259,7 @@ class SyncGoogleCalendarService(
}
).execute().id
} catch (e: Exception) {
logger.error("GoogleCalendarService#createSamaCalendar", e)
throw translatedGoogleException(e)
}

Expand Down

0 comments on commit 0bf52bf

Please sign in to comment.