Improved shown error messages.
This commit is contained in:
parent
54f36bcf0d
commit
dde19bd53c
1 changed files with 10 additions and 0 deletions
|
@ -37,6 +37,16 @@ class _Singleton
|
||||||
detail = jqxhr.responseText
|
detail = jqxhr.responseText
|
||||||
if !status && !detail
|
if !status && !detail
|
||||||
detail = 'General communication error, maybe internet is not available!'
|
detail = 'General communication error, maybe internet is not available!'
|
||||||
|
|
||||||
|
# do not show any error message on wrong login
|
||||||
|
return if status is 422
|
||||||
|
|
||||||
|
# show human readable message
|
||||||
|
if status is 401
|
||||||
|
status = 'Access denied.'
|
||||||
|
detail = ''
|
||||||
|
|
||||||
|
# show error message
|
||||||
new App.ErrorModal(
|
new App.ErrorModal(
|
||||||
message: 'StatusCode: ' + status
|
message: 'StatusCode: ' + status
|
||||||
detail: detail
|
detail: detail
|
||||||
|
|
Loading…
Reference in a new issue