You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We go through an array of Calendar Objects and the parse the ICal data one by one. Now, if even one of them fails due to bad ICal body, the function basically just breaks and nothing else works. Essentially, instead of skipping that specific item, it breaks the entire loop and even more (if users have a google calendar for example, which is checked for freebusy data in a different file).
So, perhaps the addition of a function that allows us to know if the ICal data is parseable in the first place, and that doesn't really throw an error but returns true or false, that could be the ideal solution for such cases.
Once again, really appreciate your help here 🙏
The text was updated successfully, but these errors were encountered:
alishaz-polymath
changed the title
Feature request: Can we opt in to the throwing parse failure in poorly constructed ICal
Feature request: A function that returns true or false if the ICal data is parseable
Mar 24, 2023
Hi there, first of all, amazing product.
I was wondering if here:
https://github.com/kewisch/ical.js/blob/main/lib/ical/parse.js#LL44
We could maybe not break the flow entirely by throwing an error (at least as an opt in).
Here's the scenario where this is a bit of a pain:
In the
getAvailability()
function in calcom (REF: https://github.com/calcom/cal.com/blob/main/packages/lib/CalendarService.ts#L297)We go through an array of Calendar Objects and the parse the ICal data one by one. Now, if even one of them fails due to bad ICal body, the function basically just breaks and nothing else works. Essentially, instead of skipping that specific item, it breaks the entire loop and even more (if users have a google calendar for example, which is checked for freebusy data in a different file).
So, perhaps the addition of a function that allows us to know if the ICal data is parseable in the first place, and that doesn't really throw an error but returns true or false, that could be the ideal solution for such cases.
Once again, really appreciate your help here 🙏
The text was updated successfully, but these errors were encountered: