Skip to content

An error in the response body should destroy the response stream in Node #3011

Description

@gmaclennan

Describe the bug

If a response body stream is aborted or errors, the node response stream should be destroyed and the socket closed. Currently an error in the response body stream results in an unhandled error and does not close the socket.

To Reproduce Steps to reproduce the behavior:

Abort or create an error in a stream that has been sent as a response body when using the node handler.

Expected behavior

The reponse stream should be closed and the client should see and RST ECONNRESET.

Environment:

  • OS: MacOS
  • @whatwg-node/server
  • NodeJS: v22.20.0

Additional context

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