title: How to console log the whole content of error in the catch block of a fetch call when there is a network failure
body: <p>I am making a network request in a react native project using the fetch api. It works well in normal conditions but when I am offline the catch block just gives as result of the logging error but when I do err.message I get "Network request failed" I was hoping to get some codes. How can I get the possible codes to check for in anticipation of a network failure?</p>
  
  <p>I tried logging the entire err and I get nothing but when I use err.message I get "Network request failed"</p>
  
  <pre><code>fetch(url, {
      method: 'GET',
      headers: {
      Accept: 'application/json',
      'Content-Type': 'application/json',
      }
  })
  .then((response) =&gt; response.json())
  .then((responseJson) =&gt; {
       this.setState({ procesing: false });
       this.setState({ music: responseJson });
  
  })
  .catch(err =&gt; {
       console.log(err)
       console.log(err.message)
  })
  </code></pre>
  
  <p>for <code>console.log(err)</code>, I expected to have and error code and the corresponding message but I get nothing</p>