Skip to content

Commit

Permalink
Merge pull request #72 from tourlane/TRIP-10326
Browse files Browse the repository at this point in the history
  • Loading branch information
RubLo authored Oct 24, 2023
2 parents 60b9e17 + 5d0ef78 commit 7612c2d
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions packages/app-store/googlecalendar/lib/CalendarService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ export default class GoogleCalendarService implements Calendar {
},
function (error, event) {
if (error || !event?.data) {
console.error("There was an error contacting google calendar service: ", error);
Sentry.captureException(error);
console.error(`There was an error in "createEvent" contacting google calendar service: ${error}`);

return reject(error);
}

Expand Down Expand Up @@ -225,7 +227,8 @@ export default class GoogleCalendarService implements Calendar {
},
function (err, evt) {
if (err) {
console.error("There was an error contacting google calendar service: ", err);
Sentry.captureException(err);
console.error(`There was an error in "updateEvent" contacting google calendar service: ${err}`);

return reject(err);
}
Expand Down Expand Up @@ -289,6 +292,8 @@ export default class GoogleCalendarService implements Calendar {
if (err.code === 410) return resolve();
console.error("There was an error contacting google calendar service: ", err);
if (err.code === 404) return resolve();

Sentry.captureException(err);
return reject(err);
}
return resolve(event?.data);
Expand Down Expand Up @@ -351,7 +356,11 @@ export default class GoogleCalendarService implements Calendar {
);
})
.catch((err) => {
this.log.error("There was an error contacting google calendar service: ", err);
Sentry.captureException(err);

this.log.error(
`There was an error in "getAvailability" contacting google calendar service: ${err}`
);

reject(err);
});
Expand Down Expand Up @@ -384,7 +393,8 @@ export default class GoogleCalendarService implements Calendar {
);
})
.catch((err: Error) => {
this.log.error("There was an error contacting google calendar service: ", err);
this.log.error(`There was an error in "listCalendars" contacting google calendar service: ${err}`);
Sentry.captureException(err);

reject(err);
});
Expand Down

0 comments on commit 7612c2d

Please sign in to comment.