Skip to content

ReadableStream pipeTo() should throw on error #3003

@gmaclennan

Description

@gmaclennan

Describe the bug

If you use readable.pipeTo(writable) it should throw if there is an error from the destination during write. Currently any errors are caught and the writable is aborted, but the pipeTo() method resolves without an error.

To Reproduce Steps to reproduce the behavior:

Pipe the ponyfilled Readable stream to a writable stream that errors. The pipeTo() returned promise will resolve without error.

Expected behavior

pipeTo() should throw on error.

Environment:

N/A

Additional context

This is important because the ponyfilled ReadableStream implementation is used by default in @whatwg-node/server and this bug causes issues consuming request.body.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions