Refaktor calendar error once again for better messaging to the user

This commit is contained in:
veeck
2021-05-02 10:28:11 +02:00
parent d43a57af36
commit 06b3f92963
3 changed files with 8 additions and 11 deletions

View File

@@ -146,12 +146,9 @@ Module.register("calendar", {
this.broadcastEvents();
}
}
} else if (notification === "FETCH_ERROR") {
} else if (notification === "CALENDAR_ERROR") {
this.error = this.translate("MODULE_CONFIG_ERROR", { MODULE_NAME: this.name, ERROR: payload.error });
this.loaded = true;
} else if (notification === "INCORRECT_URL") {
this.error = `Incorrect url: ${payload.url}`;
this.loaded = true;
}
this.updateDom(this.config.animationSpeed);