title: Why do I get "Fetch failed loading" when it actually worked?
body: <p>I use the following code to POST the users position to my own backend-service via the Fetch API:</p>
  <pre><code>window.onload = () =&gt; {
      let getPosition = (options) =&gt; {
          return new Promise((resolve, reject) =&gt; {
              navigator.geolocation.getCurrentPosition(resolve, reject, options);
          });
      };
  
      getPosition().then(pos =&gt; {
          const data = new FormData();
          data.append('latitude', String(pos.coords.latitude));
          data.append('longitude', String(pos.coords.longitude));
  
          fetch('/', {             // &lt;--- error is thrown in this line
              method: 'POST',
              body: data
          }).then(response =&gt; {
              if (!response.ok) {
                  throw Error('Data sent - Network response NOT OK');
              } else {
                  console.log('Data sent - Network response OK')
              }
          });
      });
  };
  </code></pre>
  <p>This works flawlessly and the backend-service sends back a positive empty response. <code>Data sent - Network response OK</code> is logged in the browser's console and everything is fine except that immediately after, this is logged:</p>
  <p><a href="https://i.stack.imgur.com/NrELL.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NrELL.png" alt="enter image description here" /></a></p>
  <p>How come I get a <code>Fetch failed loading: POST</code> even though the POST succeeded, the response is OK and the status code in the Chrome network tab is <code>200 OK</code>? Is there something wrong with my code?</p>