Skip to content

Commit

Permalink
more correct cancelation logging
Browse files Browse the repository at this point in the history
  • Loading branch information
bmos authored Nov 11, 2023
1 parent b77a36b commit 008ce8c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions google-calendar-event-management.gs
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,12 @@ const cancelGoogleEvent = async (event, action_network_id, google_id) => {

try {
Calendar.Events.delete(calendarId, google_id);
Logger.log(`${eventName} has now been deleted from Google Calendar at ${google_id}.`);
return google_id;
} catch (e) {
Logger.log(`${eventName} may have already been deleted from Google Calendar at ${google_id}.`);
return false;
}

Logger.log(`${eventName} has now been deleted from Google Calendar at ${google_id}.`);
return true;
return false;
};

0 comments on commit 008ce8c

Please sign in to comment.