mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-28 09:01:44 +00:00
Update error handling for newsfeed and calendar
This commit is contained in:
@@ -89,6 +89,9 @@ Module.register("newsfeed", {
|
||||
|
||||
this.loaded = true;
|
||||
this.error = null;
|
||||
} else if (notification === "FETCH_ERROR") {
|
||||
this.error = `Could not fetch newsfeed ${payload.url}`;
|
||||
this.scheduleUpdateInterval();
|
||||
} else if (notification === "INCORRECT_URL") {
|
||||
this.error = `Incorrect url: ${payload.url}`;
|
||||
this.scheduleUpdateInterval();
|
||||
|
@@ -52,6 +52,7 @@ module.exports = NodeHelper.create({
|
||||
});
|
||||
|
||||
fetcher.onError((fetcher, error) => {
|
||||
Log.error("Newsfeed Error. Could not fetch newsfeed: ", fetcher.url(), error);
|
||||
this.sendSocketNotification("FETCH_ERROR", {
|
||||
url: fetcher.url(),
|
||||
error: error
|
||||
|
Reference in New Issue
Block a user