title: Catch block not working in node fetch
body: <p>Trying to learn, Javascript. Pardon if this is really a basic thin i am missing.</p>
  
  <p>I am trying to run <code>node-fetch</code> to a wrong url, and i expect that it should be catched and log my appropriate message. However when i run this file through node, it gives me uncatched error</p>
  
  <pre><code>    const fetch = require('node-fetch');
  
      fetch('http://api.icnd.com/jokes/random/10')
          .then(response =&gt; {
              response.json().then((data) =&gt; {
                  console.log(data)
              });
          }).
          catch(error =&gt; {
              console.log('There is some error');
          });
  
  
  
  (node:864) UnhandledPromiseRejectionWarning: FetchError: invalid json response body at http://api.icnd.com/jokes/random/10 reason: Unexpected token &lt; in JSON at position 0
      at /Users/raheel/code/js-tutorial/node_modules/node-fetch/lib/index.js:254:32
      at &lt;anonymous&gt;
      at process._tickCallback (internal/process/next_tick.js:118:7)
  (node:864) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
  (node:864) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
  </code></pre>