title: Possible unhandled promise rejection while catch is present
body: <p>I have got the following code:</p>
  
  <pre><code>export function fetchValueFromApi(){
      return function act(dispatch){
          dispatch(fetchingLimit);
          return fetch('https://someapi/v1/foo/bar?api_key=123456789')
            .then(response =&gt;{
                console.log("response",response.json());
                response.json();
            }).then(json =&gt;{
                if (json.data()) {
                    dispatch(receivingValue(json.data.result))
                } else {
                    throw new Error('Error');
                }
            }).catch(error =&gt; dispatch(receivingValueFailed(error)))
      }
  }
  </code></pre>
  
  <p>Now I know this call won't succeed. I am expecting it to fail and go into the catch. However, I am getting this error:</p>
  
  <blockquote>
    <p>Possible Unhandled Promise Rejection</p>
  </blockquote>
  
  <p>So for some reason we're not hitting the <code>.catch</code>.</p>
  
  <p>How could I solve this?</p>