eouia / MMM-CalendarExt

Calendar views for MagicMirror
MIT License
57 stars 18 forks source link

503 Service Unavailable on ICS pull kills process #39

Closed lawrence-jeff closed 6 years ago

lawrence-jeff commented 6 years ago

I have an outlook.com hosted ICS, I noticed that often CalendarExt would not display and looking at the logs it seems to happen when it gets a 503 Service Unavailable response when trying to download the ICS file. (in Calendar.js). Other modules pulling from the same file don't seem to have any issue. Is the code expected to retry at the next refresh interval (It doesn't seem to) when this happens it looks like the only recovery method is to restart mm, should this intstead retry a certain number of times before giving up (or retry on every refresh)

eouia commented 6 years ago

Sorry, I cannot represent your bug. Could you share your .ics url? my email address is "eouia0819@gmail.com".

eouia commented 6 years ago

Have you got still error? I cannot help you without details. I'll close this issue; you can ask me whenever you need. Good luck to you.

lawrence-jeff commented 6 years ago

Sorry - for the issue wasn't so much with my specific ICS link but more about how the module handles 503 errors returned on the fetch - since 503 is somewhat a try again latter error it might be an improvement to have it retry a couple times within the initial load process. However even in the current coding it seems to work itself out upon the next refresh cycle.

So maybe feature request to retry every X seconds if a 503 is returned upon ICS request?

eouia commented 6 years ago

I’ll consider it. Anyway still I think enough short refreshInterval could handle that case. However I may add some feature like - try 5 more times when 503 occurs.