title: Differentiate between fetch fail for timeout or for offline
body: <p>In react native, I am doing a fetch like this:</p>
  
  <pre><code>let res;
  
  try {
     res = fetch('https://ggh/api/network');
  } catch(ex) {
     console.log('ex:', ex);
  }
  </code></pre>
  
  <p>Gives the same <code>ex</code> for automatic timeout, and also for if offline. For the url <code>https://ggh/api/network</code> it is for sure a timeout error.</p>
  
  <p>I purposely don't do a promise with a preset timeout of like 10sec because I want the native system to decide when its good to timeout. Is this correct assumption? Or is there a default timeout?</p>
  
  <p>I was trying to differentiate between the two. Here were ideas I had but didn't like them:</p>
  
  <ol>
  <li>On error, use <code>NetInfo</code> and/or <code>fetch('https://www.google.com/')</code> to figure out if is really offline ELSE original fetch was a timeout
  
  <ul>
  <li>The problem with this second fetch is, if timeout is due to really bad net connectivity, user will have to wait double time - for two things to timeout</li>
  <li>problem with NetInfo I hear its not accurate and must always do a fetch to verify it</li>
  </ul></li>
  <li>If there is a default timeout for react-native fetch, I can test how long the call took, and then mark it as timeout ELSE offline.</li>
  </ol>
  
  <p>Does anyone have any other sure fire ideas?</p>