Improved error message.
This commit is contained in:
parent
a584f17b51
commit
b0f22af880
1 changed files with 7 additions and 3 deletions
|
@ -32,10 +32,14 @@ class _Singleton
|
||||||
)
|
)
|
||||||
|
|
||||||
# show error messages
|
# show error messages
|
||||||
$('body').bind( 'ajaxError', (e,jqxhr, settings, exception) ->
|
$('body').bind( 'ajaxError', ( e, jqxhr, settings, exception ) ->
|
||||||
|
status = jqxhr.status
|
||||||
|
detail = jqxhr.responseText
|
||||||
|
if !status && !detail
|
||||||
|
detail = 'General communication error, maybe internet is not available!'
|
||||||
new App.ErrorModal(
|
new App.ErrorModal(
|
||||||
message: 'StatusCode: ' + jqxhr.status
|
message: 'StatusCode: ' + status
|
||||||
detail: jqxhr.responseText
|
detail: detail
|
||||||
close: true
|
close: true
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue