Re: [whatwg/fetch] Attach timing info and URL to network errors, and report for fetch API (#1311)

Looking at this again I think I missed something initially and this could be a lot simpler. All these network errors end up in "fetch finale" and it seems that at that point we could initialize them.

That leaves "finalize response". I suppose that for some network errors (in particular CORS) there could be a successful body stream so this would come later. For others that might not happen. Either way, we probably want to report them as soon as possible (i.e., as part of "fetch finale") to avoid leaking timing information. (Which also means "finalize response" (or its callers) has to filter out network errors or some such.)

Does that make sense or am I missing something here?

-- 
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/1311#issuecomment-931171675

Received on Thursday, 30 September 2021 09:56:41 UTC