Re: [whatwg/fetch] Add abort reason to abort fetch (PR #1343)

@domenic approved this pull request.

LGTM with nits, very nice!

> @@ -254,8 +257,20 @@ given a <a>fetch controller</a> <var>controller</var>:
 </ol>
 
 <p>To <dfn export for="fetch controller">abort</dfn> a <a for=/>fetch controller</a>
-<var>controller</var>, set <var>controller</var>'s <a for="fetch controller">state</a> to
-"<code>aborted</code>".
+<var>controller</var> with optional <var>error</var>:
+
+<ol>
+ <li><p>Set <var>controller</var>'s <a for="fetch controller">state</a> to "<code>aborted</code>".
+
+ <li><p>Let <var>error</var> be an "{{AbortError}}" {{DOMException}}, if it is not given.
+
+ <li><p>Let <var>serializedError</var> be [$StructuredSerialize$](<var>error</var>).
+ If that threw an exception, let <var>serializedError</var> be

```suggestion
 If that threw an exception, catch it, and let <var>serializedError</var> be
```

> @@ -7800,12 +7831,10 @@ method steps are:
  <li><p>Return <var>p</var>.
 </ol>
 
-<p>To <dfn>abort fetch</dfn> with a <var>promise</var>, <var>request</var>, and
-<var>responseObject</var>, run these steps:
+<p>To <dfn lt="Abort the fetch() call" export id=abort-fetch-algorithm>abort a fetch() call</dfn> with a

```suggestion
<p>To <dfn lt="abort the fetch() call" export id=abort-fetch-algorithm>abort a fetch() call</dfn> with a
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1343#pullrequestreview-1098712583
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1343/review/1098712583@github.com>

Received on Wednesday, 7 September 2022 08:06:37 UTC