Re: [whatwg/fetch] processResponseDone should receive a response (#1202)

> I see where the confusion lies. A HTTP status code of 4xx, 5xx, or even 9xx is not a network error. That's a normal response as far as fetch is concerned. A network error is something more fundamental or the result of a security policy, e.g.:
> 
> * DNS error
> * TLS error
> * Broken H/2 framing
> * CORS error
> * CSP block
> * Mixed Content block
> 
> Whether a response with a non-2xx HTTP status code results in an "error" depends on the endpoint. For `<object>` and `<script>` it does, for `<img>` it does not. (I.e., unfortunately 2xx vs non-2xx is exposed to some extent.)
> 
> I think in principle we could do one of these:
> 
> * expose timing information for all of these, including network errors (using TAO as a policy and treating network errors as not having TAO).
> * expose timing information for responses, but not network errors
> * expose timing information for responses that result in a "load" event on their endpoint
> 
> But what we cannot do (in my opinion) is distinguish between network errors.

Let's continue the discussion in https://github.com/whatwg/fetch/issues/1215.


-- 
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/pull/1202#issuecomment-820213134

Received on Thursday, 15 April 2021 08:04:24 UTC