fix: [ui] Show proper error message for ForbiddenException again

pull/5073/head
Jakub Onderka 2019-08-28 09:23:22 +02:00 committed by GitHub
parent 82e70fee12
commit 8ab828bf45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -1619,10 +1619,14 @@ function getPopup(id, context, target, admin, popupType) {
$(popupType).html(data);
openPopup(popupType, false);
},
error:function() {
error:function(xhr) {
$(".loading").hide();
$("#gray_out").fadeOut();
showMessage('fail', 'Something went wrong - the queried function returned an exception. Contact your administrator for further details (the exception has been logged).');
if (xhr.status === 403) {
showMessage('fail', 'Not allowed.');
} else {
showMessage('fail', 'Something went wrong - the queried function returned an exception. Contact your administrator for further details (the exception has been logged).');
}
},
url: url
});