Refaktor newsfeed error once again for better messaging to the user

This commit is contained in:
veeck
2021-05-02 10:24:22 +02:00
parent aeefe28710
commit d43a57af36
5 changed files with 20 additions and 11 deletions

View File

@@ -89,11 +89,8 @@ Module.register("newsfeed", {
this.loaded = true;
this.error = null;
} else if (notification === "FETCH_ERROR") {
this.error = `${payload.error}`;
this.scheduleUpdateInterval();
} else if (notification === "INCORRECT_URL") {
this.error = `Incorrect url: ${payload.url}`;
} else if (notification === "NEWSFEED_ERROR") {
this.error = this.translate(payload.error_type);
this.scheduleUpdateInterval();
}
},