Skip to content

Commit

Permalink
Fully read's processBodyError argument needs to take an exception
Browse files Browse the repository at this point in the history
Fixes #1636.
  • Loading branch information
annevk committed May 4, 2023
1 parent 4502481 commit 47df1a3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,8 @@ must be an algorithm accepting an exception.
<var>processBody</var>, an algorithm <var>processBodyError</var>, and an optional null,
<a for=/>parallel queue</a>, or <a for=/>global object</a> <var>taskDestination</var> (default
null), run these steps. <var>processBody</var> must be an algorithm accepting a
<a for=/>byte sequence</a>. <var>processBodyError</var> must be an algorithm accepting no arguments.
<a for=/>byte sequence</a>. <var>processBodyError</var> must be an algorithm optionally accepting an
<a for=/>exception</a>.

<ol>
<li><p>If <var>taskDestination</var> is null, then set <var>taskDestination</var> to the result of
Expand All @@ -1520,8 +1521,9 @@ null), run these steps. <var>processBody</var> must be an algorithm accepting a
<a>queue a fetch task</a> to run <var>processBody</var> given <var>bytes</var>, with
<var>taskDestination</var>.

<li><p>Let <var>errorSteps</var> be to <a>queue a fetch task</a> to run
<var>processBodyError</var>, with <var>taskDestination</var>.
<li><p>Let <var>errorSteps</var> optionally given an <a for=/>exception</a> <var>exception</var> be
to <a>queue a fetch task</a> to run <var>processBodyError</var> given <var>exception</var>, with
<var>taskDestination</var>.

<li><p>Let <var>reader</var> be the result of <a for=ReadableStream>getting a reader</a> for
<var>body</var>'s <a for=body>stream</a>. If that threw an exception, then run
Expand Down Expand Up @@ -8988,6 +8990,7 @@ Rondinelly,
Rory Hewitt,
Ross A. Baker,
Ryan Sleevi,
Sam Atkins,
Samy Kamkar,
Sébastien Cevey,
Sendil Kumar N,
Expand Down

0 comments on commit 47df1a3

Please sign in to comment.