Steps to reproduce
Pass a request body to handleWeb whose ReadableStream errors asynchronously while writeToStore is consuming it.
writeToStore currently swallows the nodeStream error and passes nodeStream.pipe(proxy) to pipeline(). Since .pipe() returns proxy and does not forward source errors, the proxy and datastore write can remain open indefinitely.
Expected behavior
The write rejects and all stream/timer/listener cleanup runs.
Actual behavior
The pipeline can remain pending because neither an error nor EOF reaches proxy.
Investigation direction
Forward source errors into the proxy/pipeline while preserving the existing behavior that avoids destroying the underlying request stream. Add coverage using an asynchronously errored web ReadableStream.
Noticed while reviewing #858; the behavior predates that PR.
Steps to reproduce
Pass a request body to
handleWebwhoseReadableStreamerrors asynchronously whilewriteToStoreis consuming it.writeToStorecurrently swallows thenodeStreamerror and passesnodeStream.pipe(proxy)topipeline(). Since.pipe()returnsproxyand does not forward source errors, the proxy and datastore write can remain open indefinitely.Expected behavior
The write rejects and all stream/timer/listener cleanup runs.
Actual behavior
The pipeline can remain pending because neither an error nor EOF reaches
proxy.Investigation direction
Forward source errors into the proxy/pipeline while preserving the existing behavior that avoids destroying the underlying request stream. Add coverage using an asynchronously errored web
ReadableStream.Noticed while reviewing #858; the behavior predates that PR.