summaryrefslogtreecommitdiffstats
path: root/public_html
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-10-19 12:07:35 +0200
committerAleksander Machniak <alec@alec.pl>2012-10-19 12:07:35 +0200
commit87bb8b49ea269dc6a4e071000f636fde9f7ade27 (patch)
treefba1b625eeff65a03516c4f423762546e885b6fb /public_html
parent704ba022c02a40ca27ad685836c831dbfeca8f55 (diff)
downloadwebadmin-87bb8b49ea269dc6a4e071000f636fde9f7ade27.tar.gz
Improved API errors handling added error logging and logout on invalid session
Diffstat (limited to 'public_html')
-rw-r--r--public_html/js/kolab_admin.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/public_html/js/kolab_admin.js b/public_html/js/kolab_admin.js
index 4f79b5f..99fc6b9 100644
--- a/public_html/js/kolab_admin.js
+++ b/public_html/js/kolab_admin.js
@@ -355,12 +355,11 @@ function kolab_admin()
this.set_busy(false);
if (!response || response.status != 'OK') {
- var msg = response && response.reason ? response.reason : this.t('servererror');
- this.display_message(msg, 'error');
-
// Logout on invalid-session error
if (response && response.code == 403)
this.main_logout();
+ else
+ this.display_message(response && response.reason ? response.reason : this.t('servererror'), 'error');
return false;
}