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

@domenic approved this pull request.

LGTM with nit!

> @@ -7796,10 +7824,12 @@ method steps are:
   <ol>
    <li><p>Set <var>locallyAborted</var> to true.
 
-   <li><p><a>Abort fetch</a> with <var>p</var>, <var>request</var>, and <var>responseObject</var>.
+   <li><p><a>Abort the fetch() call</a> with <var>p</var>, <var>request</var>, <var>responseObject</var>, and

```suggestion
   <li><p><a>Abort the <code>fetch()</code> call</a> with <var>p</var>, <var>request</var>, <var>responseObject</var>, and
```

here and elsewhere

> @@ -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 an optional <var>error</var>:
+
+<ol>
+ <li><p>Set <var>controller</var>'s <a for="fetch controller">state</a> to "<code>aborted</code>".
+
+ <li><p>Set <var>error</var> to an "{{AbortError}}" {{DOMException}} if it is not given.
+
+ <li><p>Let <var>serializedError</var> be [$StructuredSerialize$](<var>error</var>).
+ If that threw an exception, catch it, and let <var>serializedError</var> be
+ [$StructuredSerialize$](a new "{{AbortError}}" {{DOMException}}).

I'm not sure what this refers to... how would StructuredSerialize() return undefined?

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

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

Received on Monday, 3 October 2022 08:16:07 UTC