fix: [UI] Better error message for error AJAX message

pull/8611/head
Jakub Onderka 2022-09-23 11:00:31 +02:00
parent 08cab274a0
commit 62bf9cf3e0
1 changed files with 3 additions and 1 deletions

View File

@ -52,7 +52,9 @@ function rgb2hex(rgb) {
}
function xhrFailCallback(xhr) {
if (xhr.status === 401) {
if (xhr.status === 0) {
showMessage('fail', 'Something went wrong server is not responding.');
} if (xhr.status === 401) {
showMessage('fail', 'Unauthorized. Please reload page to log again.');
} else if (xhr.status === 403 || xhr.status === 405) {
showMessage('fail', 'Not allowed.');