Skip to content

fix: handle all HTTP/2 request stream sync errors#5311

Open
mcollina wants to merge 1 commit into
mainfrom
fix/http2-session-request-sync-errors
Open

fix: handle all HTTP/2 request stream sync errors#5311
mcollina wants to merge 1 commit into
mainfrom
fix/http2-session-request-sync-errors

Conversation

@mcollina
Copy link
Copy Markdown
Member

Summary

  • handle every synchronous session.request() failure in the HTTP/2 dispatcher via Undici's normal request error path
  • preserve the original Node.js error as the InformationalError cause
  • add a regression test for ERR_HTTP2_HEADER_SINGLE_VALUE from duplicate single-value HTTP/2 headers and verify queued requests resume

Fixes #4356

Testing

  • npx borp -p "test/http2-invalid-connection-headers.js"
  • npx eslint lib/dispatcher/client-h2.js test/http2-invalid-connection-headers.js
  • npm run test:h2:core

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.24%. Comparing base (81fdf87) to head (77541ab).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5311   +/-   ##
=======================================
  Coverage   93.23%   93.24%           
=======================================
  Files         110      110           
  Lines       36574    36570    -4     
=======================================
- Hits        34101    34099    -2     
+ Misses       2473     2471    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mcollina mcollina requested review from metcoder95 and trivikr May 18, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid HTTP2 headers should be recoverable

3 participants