title: Fetch: reject promise and catch the error if status is not OK?
body: <p>Here's what I have going:</p>
  
  <pre><code>import 'whatwg-fetch';
  
  function fetchVehicle(id) {
      return dispatch =&gt; {
          return dispatch({
              type: 'FETCH_VEHICLE',
              payload: fetch(`http://swapi.co/api/vehicles/${id}/`)
                  .then(status)
                  .then(res =&gt; res.json())            
                  .catch(error =&gt; {
                      throw(error);
                  })
              });
      };
  }
  
  function status(res) {
      if (!res.ok) {
          return Promise.reject()
      }
      return res;
  }
  </code></pre>
  
  <p>EDIT: The promise doesn't get rejected, that's what I'm trying to figure out.</p>
  
  <p>I'm using this <a href="https://github.com/github/fetch" rel="noreferrer">fetch polyfill</a> in Redux with <a href="https://github.com/pburtchaell/redux-promise-middleware" rel="noreferrer">redux-promise-middleware</a>.</p>