Skip to content

Commit a692a06

Browse files
committed
Google Calendar - New Created or Updated Event (Instant) - update to handle invalid sync token
* Bug fix: When the listEvents API returned a 410 status, this threw an exception instead of returning to code that handles this condition. The API call is changed to allow a 410 status to be returned.
1 parent f9644ce commit a692a06

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

components/google_calendar/sources/new-or-updated-event-instant/new-or-updated-event-instant.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ export default {
266266
syncToken,
267267
pageToken: nextPageToken,
268268
maxResults: 2500,
269+
validateStatus: (status) => (status >= 200 && (status < 300 || status == 410)),
269270
});
270271
if (syncStatus === 410) {
271272
console.log("Sync token invalid, resyncing");

0 commit comments

Comments
 (0)