You will need to perform error handling for any Ext classes that you use for Ajax connections. Some of these may include Ext.data.Connection , Ext.data.proxy.Ajax and Ext.form.action.Action .
For example, with Ext.data.proxy.Ajax you can override the class to add a listener to requestexception :
Ext.define('MyApp.override.AjaxProxy', { override: 'Ext.data.proxy.Ajax', constructor: function(config) { this.callParent(config); this.on('requestexception', MyApp.utils.Utils.handle401Error); } })
source share