[whatwg/streams] "close a ReadableStream" asserts that ReadableByteStreamControllerClose can’t throw (Issue #1387)

shannonbooth created an issue (whatwg/streams#1387)

### What is the issue with the Streams Standard?

[close](https://streams.spec.whatwg.org/#readablestream-close) performs ! ReadableByteStreamControllerClose(controller).

Fetch can hit this assert when a network body ends, for example with a 1-byte response:

```js
const response = await fetch("/one-byte");
await response.body.getReader({ mode: "byob" }).read(new Uint16Array(1));
```

FileAPI usage can also hit it.

The byte goes into the pending pull into, then Fetch closes the stream, and the close throws.

I believe we can just return early if this hit

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

Message ID: <whatwg/streams/issues/1387@github.com>

Received on Saturday, 24 October 2026 14:21:28 UTC