Repository navigation
Conversation
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6028 +/- ##
==========================================
+ Coverage 91.56% 91.59% +0.02%
==========================================
Files 113 113
Lines 43938 43942 +4
==========================================
+ Hits 40234 40248 +14
+ Misses 3704 3694 -10 β View full report in Codecov by Harness. π New features to boost your workflow:
|
3 of 7 tasks
metcoder95
approved these changes
Oct 16, 2026
4 of 5 tasks
Merged
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.
This relates to...
Fixes #6027
Rationale
The HTTP/1.1 and HTTP/2 clients deliver interim
1xxresponses (e.g.103 Early Hints) throughonResponseStartbefore the final response.DecoratorHandler.onResponseStartasserts it is only called once, so any handler built on it (the dns interceptor'sDNSDispatchHandlerin the issue) fails the request withERR_ASSERTIONwhen the final response arrives after an interim one.Changes
DecoratorHandler.onResponseStartonly applies the once-only check (and sets the flag) for final responses (statusCode >= 200). Interim responses are still forwarded to the wrapped handler, which already ignores them where needed (e.g.fetch).DecoratorHandlerunit test (a103then a200are both forwarded, and a second final response still asserts), and a dns interceptor test fetching from a server that sends103 Early Hints. Both fail onmain.Features
N/A
Bug Fixes
DecoratorHandler(such asinterceptors.dns()) no longer fail when a response is preceded by a1xxinterim response.Breaking Changes and Deprecations
N/A
Status
Tested locally on Linux with Node 24:
npm run lintandnpm run test:unit(1634 tests, 1629 pass, 5 skipped, 0 fail).