only show message on real error

This commit is contained in:
Christian Herzog
2019-10-06 15:26:24 +02:00
parent 372dcb1640
commit 5c8f57a95c

View File

@@ -656,8 +656,10 @@ function checkStatus(){
}
blockAjax = false;
})
.fail(function() {
showMessage('Could not get status.json!', 'ERROR');
.fail(function(xhr, ajaxOptions, thrownError) {
console.log(xhr.status);
console.log(thrownError);
if (thrownError != '') showMessage(thrownError, 'ERROR');
blockAjax = false;
});
}
@@ -701,9 +703,11 @@ function getConfig() {
"</tr>"
);
})
.fail(function() {
showMessage('Could not get config.json!', 'ERROR');
console.log("failed to fetch config!");
.fail(function(xhr, ajaxOptions, thrownError) {
console.log(xhr.status);
console.log(thrownError);
if (thrownError != '') showMessage(thrownError, 'ERROR');
blockAjax = false;
});
}