mirror of https://gitee.com/bigwinds/arangodb
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:
parent
c3c6220eeb
commit
36cd02065f
|
@ -11,18 +11,22 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
var installCallback = function(result) {
|
var installCallback = function(result) {
|
||||||
|
window.hass = result;
|
||||||
if (result.error === false) {
|
if (result.error === false) {
|
||||||
this.collection.fetch({ async: false });
|
this.collection.fetch({ async: false });
|
||||||
window.modalView.hide();
|
window.modalView.hide();
|
||||||
this.reload();
|
this.reload();
|
||||||
} else {
|
} else {
|
||||||
// TODO Error handling properly!
|
var res = result;
|
||||||
switch(result.errorNum) {
|
if (result.hasOwnProperty("responseJSON")) {
|
||||||
|
res = result.responseJSON;
|
||||||
|
}
|
||||||
|
switch(res.errorNum) {
|
||||||
case errors.ERROR_APPLICATION_DOWNLOAD_FAILED.code:
|
case errors.ERROR_APPLICATION_DOWNLOAD_FAILED.code:
|
||||||
alert("Unable to download application from the given repository.");
|
alert("Unable to download application from the given repository.");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
alert("Error: " + result.errorNum + ". " + result.errorMessage);
|
alert("Error: " + res.errorNum + ". " + res.errorMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue