title: RxJS 5: how to get statusCode on catch
body: <p>How do I get the status code back from a failed <code>ajax</code> call in RxJS so I can decide what to do with it?</p>
  
  <pre><code>import { ajax } from 'rxjs/observable/dom/ajax'
  
  ajax('https://my.url')
    .map(xhr =&gt; console.log('woo', xhr.response))
    .catch(err =&gt; console.log('status code??'))
  </code></pre>
  
  <p>there are some fields on the <code>err</code> response and one of them is <code>status</code> but it's always <code>0</code> irrespective of the statusCode. </p>