diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-08-03 11:20:21 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-08-03 11:20:21 +1200 |
commit | 8e41bea48b0b248bcb198186783778002a92738e (patch) | |
tree | c93686359285fcabe316a278c76ef0de78813a33 /web | |
parent | a265f39cef279d84bbeee5be68c17d22896bb685 (diff) | |
download | trackermap-server-8e41bea48b0b248bcb198186783778002a92738e.tar.gz trackermap-server-8e41bea48b0b248bcb198186783778002a92738e.tar.bz2 trackermap-server-8e41bea48b0b248bcb198186783778002a92738e.zip |
Handle HTTP error codes
Diffstat (limited to 'web')
-rw-r--r-- | web/app/ErrorManager.js | 6 |
1 files changed, 5 insertions, 1 deletions
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; } }, |