[whatwg/fetch] Should `status = 0` be considered `ok` for `mode: no-cors`-requests? (#1140)

According to the [WHATWG Spec.](https://fetch.spec.whatwg.org/#concept-filtered-response-opaque), `status` should be set to `0` for a so called `opaque` response stemming from a `mode: "no-cors"`-request. Interestingly enough, it's not considered an "OK" response in regards to `response.ok` (only includes `2xx`).

I personally find this unexpected and confusing. 
Therefore, can we make an exception and treat `0` as OK for `mode: no-cors`-requests?

This issue first appeared in [ky](https://github.com/sindresorhus/ky/issues/305) which throws an error if `response.ok = false`.

-- 
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/1140

Received on Tuesday, 19 January 2021 19:38:08 UTC