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

@@ -122,6 +122,14 @@ NodeHelper.checkFetchStatus = function (response) {
}
};
NodeHelper.checkFetchError = function (error) {
let error_type = "MODULE_ERROR_UNSPECIFIED";
if (error.code === "EAI_AGAIN") {
error_type = "MODULE_ERROR_NO_CONNECTION";
}
return error_type;
};
NodeHelper.create = function (moduleDefinition) {
return NodeHelper.extend(moduleDefinition);
};