https://developer.mozilla.org/en-US/docs/Web/API/ReadableByteStreamController/close
ReadableByteStreamController: close() method - Web APIs | MDN
The close() method of the ReadableByteStreamController interface closes the associated stream.
web apisreadablebytestreamcontrollerclosemethodmdn
https://developer.mozilla.org/en-US/docs/Web/API/ReadableByteStreamController/error
ReadableByteStreamController: error() method - Web APIs | MDN
The error() method of the ReadableByteStreamController interface causes any future interactions with the associated stream to error with the specified reason.
web apisreadablebytestreamcontrollererrormethodmdn