Conversation
Collaborator
|
Review requested:
|
Keep the original socket error as the cause of ECONNRESET errors emitted when an HTTP response closes before completion. Preserve the existing aborted message, error code, and event order. Leave cause absent when there is no underlying error. Allow ConnResetException to accept Error options, document the behavior, and cover TLS record errors, TCP resets, explicit destruction, and premature closure without a socket error. This follows investigation of nodejs#66001 and addresses lost error context. The original TLS decryption failure remains unresolved. Refs: nodejs#66001 Signed-off-by: XadillaX <[email protected]>
XadillaX
force-pushed
the
fix-http-response-socket-error
branch
from
September 16, 2026 12:21
dceab63 to
cd91d44
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #66061 +/- ##
==========================================
+ Coverage 89.99% 90.26% +0.26%
==========================================
Files 784 789 +5
Lines 268410 271477 +3067
Branches 51124 51811 +687
==========================================
+ Hits 241562 245048 +3486
+ Misses 17385 16919 -466
- Partials 9463 9510 +47
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a socket error interrupts an HTTP response, the request receives the original error, but the response and its downstream pipeline receive only
ECONNRESET: aborted. The underlying cause is lost.Preserve that original error as
causeon the response error, keeping the existingECONNRESETcode,abortedmessage, and event order. This applies to TLS errors and actual TCP resets alike. Premature closure without an underlying error leavescauseabsent.This came out of investigating #66001. I could not reproduce or identify the root cause of the reported TLS decryption failure on an intact stream, but confirmed the separate loss of error context described above. The original failure remains unresolved; this PR is limited to preserving diagnostic context. The TLS regression test deliberately sends an invalid record after response headers have been received to test error propagation.
Validation on macOS arm64:
causeidentity and property attributes, and event order.causeis missing.git diff --checkpassed.Refs: #66001
AI assistance: GPT-6 assisted with investigation, implementation, tests, and this description. The compatibility approach was selected through discussion with the contributor; the validation above was run by the assistant.