title: ExtJS: Get operation.error on beforeload store
body: <p>I have this ExtJS store, loaded remotely with Ajax:</p>
  
  <pre><code>Ext.create('Ext.data.Store', {
      storeId: 'targetNamesStore',
      fields: ['id', 'text'],
      proxy: { type: 'ajax', url: 'test.php' },
      listeners: {
          beforeload: function(store, operation) {
              console.log(operation);
              console.log('error: ' + operation.error);
          }
      }
  });
  </code></pre>
  
  <p>Along with this php code on the server side:</p>
  
  <pre><code>&lt;?php
  echo json_encode([
      'success' =&gt; false,
      'msg' =&gt; 'Some details about the error.',
      'metaData' =&gt; ['root' =&gt; 'data', 'messageProperty' =&gt; 'msg']
  ]);
  ?&gt;
  </code></pre>
  
  <p>I would like to get the details about the error, which appears to be included in the <code>operation</code> object. But when I try to get it with <code>operation.error</code>, it's <code>undefined</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/Csf2P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Csf2P.png" alt="console output"></a></p>
  
  <p>The others <code>operation</code> parameters (ie <code>success</code>, <code>limit</code>, ...) are correctly accessible. Same thing with <code>operation['error']</code> and <code>operation.getError()</code>.</p>
  
  <p>I don't understand what's happening.</p>