[w3c/ServiceWorker] Should Cache#addAll reject with AbortSignal's reason if the signal is already aborted? (Issue #1684)

Based on https://dom.spec.whatwg.org/#dom-abortsignal-abort, when a signal is aborted, the abort reason would be set to the given reason or a new `AbortError` DOMException.

Currently, in Step 5-7-3-1 in https://w3c.github.io/ServiceWorker/#dom-cache-addall, it says

> If response’s [aborted flag](https://fetch.spec.whatwg.org/#concept-response-aborted) is set, reject responsePromise with an "[AbortError](https://webidl.spec.whatwg.org/#aborterror)" [DOMException](https://webidl.spec.whatwg.org/#idl-DOMException) and abort these steps.

so it will always reject the response promise with an `AbortError` DOMException.

Should it reject with the signal's abort reason instead?

Note: In [`fetch`](https://fetch.spec.whatwg.org/#dom-global-fetch) method, in Step 4-1, when the signal is already aborted, `fetch` will reject with the signal's reason.

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

Message ID: <w3c/ServiceWorker/issues/1684@github.com>

Received on Friday, 16 June 2023 08:42:38 UTC