title: EXTJS 4 - Global exception listener
body: <p>I have a situation where I am making <code>ajax</code> requests to a server from various Ext <code>gridpanel</code> etc. In an Admin area. </p>
  
  <p>The logged in user will be logged out if there is no activity for eg. 5 minutes which is normal. </p>
  
  <p>In this case the server sends back a redirect <code>403</code> to the login page.</p>
  
  <p>Right now I am inserting a:   </p>
  
  <pre><code>listeners: {
      exception: function(proxy, response, operation, eOpts) {
          if (response.status == '403')
              window.location = 'login';
      }
  }
  </code></pre>
  
  <p>To every <code>store's</code> proxy which is a little overkill. </p>
  
  <p>Could someone be kind enough and let me know how I could add a listener to all communications between ExtJS and server? </p>
  
  <p>I am using the MVC Application Architecture so it could probably be a one liner in the <code>controller.js</code> or <code>app.js</code>. </p>
  
  <p>Thanks</p>