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) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue