From 8dc31f6bd7aa904a2709f67cf5deddd751f0407f Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 22 Apr 2017 17:14:15 +1200 Subject: Improve generic error messages --- web/app/Application.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'web/app/Application.js') diff --git a/web/app/Application.js b/web/app/Application.js index 1658e7dc..d7a5bae8 100644 --- a/web/app/Application.js +++ b/web/app/Application.js @@ -160,13 +160,15 @@ Ext.define('Traccar.Application', { } }, - showError: function (response) { - if (Ext.isString(response)) { - Ext.Msg.alert(Strings.errorTitle, response); - } else if (response.responseText) { - Ext.Msg.alert(Strings.errorTitle, response.responseText); - } else if (response.statusText) { - Ext.Msg.alert(Strings.errorTitle, response.statusText); + showError: function (error) { + if (Ext.isString(error)) { + Ext.Msg.alert(Strings.errorTitle, error); + } else if (error.responseText) { + Ext.Msg.alert(Strings.errorTitle, Strings.errorGeneral + + '

'); + } else if (error.statusText) { + Ext.Msg.alert(Strings.errorTitle, error.statusText); } else { Ext.Msg.alert(Strings.errorTitle, Strings.errorConnection); } -- cgit v1.2.3