[whatwg/fetch] Inconsistent handling of response (#1014)

Please have a look at the example below

```js
fetch('https://httpstat.us/500', {
    cache: 'no-cache',
    headers: {
      "AnyHeader": "value"
    }
  })
  .then(function(response) {
    if (!response.ok) {
      throw Error(response.statusText);
    }
    return response;
  }).then(function(response) {
    console.log('ok');
  }).catch(function(error) {
    // Promise rejected with TypeError: Failed to fetch
    console.log(error);
  });
```
If we remove the `AnyHeader` header the promise will not be rejected.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1014

Received on Tuesday, 31 March 2020 15:30:49 UTC