Version
main
Platform
Subsystem
stream
What steps will reproduce the bug?
import { push } from 'node:stream/iter';
const controller = new AbortController();
const reason = 'stop';
const { writer } = push({ signal: controller.signal });
controller.abort(reason);
try {
await writer.write('data');
} catch (error) {
console.log('same reason:', error === reason);
console.log('received:', `${error.name}: ${error.message}`);
}
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
it fails with 'stop', as required by Iterable Streams §7.1, Stream.push(), step 12, which says to put the writer into the failed state with the signal’s abort reason.
What do you see instead?
same reason: false
received: AbortError: Aborted
The writer fails with a newly created AbortError, discarding the string abort reason.
Additional information
No response
Version
main
Platform
Subsystem
stream
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
it fails with
'stop', as required by Iterable Streams §7.1,Stream.push(), step 12, which says to put the writer into the failed state with the signal’s abort reason.What do you see instead?
The writer fails with a newly created
AbortError, discarding the string abort reason.Additional information
No response