Fix calendar test

This commit is contained in:
rejas
2021-05-02 14:43:12 +02:00
committed by veeck
parent 4c8508b0a9
commit bdfd6e5e9f
5 changed files with 7 additions and 2 deletions

View File

@@ -147,7 +147,8 @@ Module.register("calendar", {
}
}
} else if (notification === "CALENDAR_ERROR") {
this.error = this.translate("MODULE_CONFIG_ERROR", { MODULE_NAME: this.name, ERROR: payload.error });
let error_message = this.translate(payload.error_type);
this.error = this.translate("MODULE_CONFIG_ERROR", { MODULE_NAME: this.name, ERROR: error_message });
this.loaded = true;
}

View File

@@ -58,6 +58,7 @@ module.exports = NodeHelper.create({
Log.error("Calendar Error. Could not fetch calendar: ", fetcher.url(), error);
let error_type = NodeHelper.checkFetchError(error);
this.sendSocketNotification("CALENDAR_ERROR", {
id: identifier,
error_type
});
});