[#121] added error handler and snackbar

This commit is contained in:
Camille Moussu
2025-10-08 18:14:15 +02:00
committed by Benoit TELLIER
parent f498309f44
commit a00f179dbd
6 changed files with 187 additions and 51 deletions
+6 -1
View File
@@ -123,12 +123,17 @@ export function parseCalendarEvent(
}
event.URL = eventURL;
if (!event.uid || !event.start) {
if (!event.uid || !event.start || !event.end) {
console.error(
`missing crucial event param in calendar ${calendarid} `,
data
);
event.error = `missing crucial event param in calendar ${calendarid} `;
if (!event.end) {
const start = event.start ? new Date(event.start) : new Date();
const artificialEnd = new Date(start.getTime() + 3600000);
event.end = formatDateToICal(artificialEnd, false);
}
}
return event as CalendarEvent;