From 8e41bea48b0b248bcb198186783778002a92738e Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 3 Aug 2015 11:20:21 +1200 Subject: Handle HTTP error codes --- web/app/ErrorManager.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'web') diff --git a/web/app/ErrorManager.js b/web/app/ErrorManager.js index e55719571..77e5ae373 100644 --- a/web/app/ErrorManager.js +++ b/web/app/ErrorManager.js @@ -27,7 +27,11 @@ Ext.define('Traccar.ErrorManager', { return false; } } else { - Ext.Msg.alert(strings.errorTitle, response.statusText); + if (response.statusText) { + Ext.Msg.alert(strings.errorTitle, response.statusText); + } else { + Ext.Msg.alert(strings.errorTitle, response.status.toString()); // TODO: text message + } return false; } }, -- cgit v1.2.3