1
0
Fork 0

Fixed a bug where it was not possible to get any error information from Foxx Apps being installed through the WebInterface.

This commit is contained in:
Michael Hackstein 2015-08-12 13:08:49 +02:00
parent c3c6220eeb
commit 36cd02065f
1 changed files with 7 additions and 3 deletions

View File

@ -11,18 +11,22 @@
};
var installCallback = function(result) {
window.hass = result;
if (result.error === false) {
this.collection.fetch({ async: false });
window.modalView.hide();
this.reload();
} else {
// TODO Error handling properly!
switch(result.errorNum) {
var res = result;
if (result.hasOwnProperty("responseJSON")) {
res = result.responseJSON;
}
switch(res.errorNum) {
case errors.ERROR_APPLICATION_DOWNLOAD_FAILED.code:
alert("Unable to download application from the given repository.");
break;
default:
alert("Error: " + result.errorNum + ". " + result.errorMessage);
alert("Error: " + res.errorNum + ". " + res.errorMessage);
}
}
};