diff --git a/modules/default/calendar/calendarfetcher.js b/modules/default/calendar/calendarfetcher.js index 7cb4434c..f6f84d71 100644 --- a/modules/default/calendar/calendarfetcher.js +++ b/modules/default/calendar/calendarfetcher.js @@ -76,7 +76,16 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn return; } - const data = ical.parseICS(requestData); + let data = []; + + try { + data = ical.parseICS(requestData); + } catch (error) { + fetchFailedCallback(self, error.message); + scheduleTimer(); + return; + } + const newEvents = []; // limitFunction doesn't do much limiting, see comment re: the dates array in rrule section below as to why we need to do the filtering ourselves