fix: preserve timeout errors for HTTP/2 requests by mcollina · Pull Request #5091 · nodejs/undici (original) (raw)

@mcollina

Fixes #5087

Description

Preserve documented timeout error semantics for HTTP/2 requests by:

This also restores RetryAgent({ errorCodes: ['UND_ERR_BODY_TIMEOUT'] }) behavior for HTTP/2 requests.

Tests

@codecov-commenter

Codecov Report

❌ Patch coverage is 94.44444% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.21%. Comparing base (cc793b7) to head (099d5e6).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/dispatcher/client-h2.js 94.44% 1 Missing ⚠️

Additional details and impacted files

@@ Coverage Diff @@ ## main #5091 +/- ##

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

🚀 New features to boost your workflow:

metcoder95

@metcoder95

@tbeseda

Anything I can do to help here? I could fork this branch, handle the conflicts (maybe 😅), and look into the Windows issues. Just didn't want to do all the ceremony if it's in active dev.

@metcoder95

@mcollina

Signed-off-by: Matteo Collina hello@matteocollina.com

@mcollina

@mcollina

…set headersTimeout, expect HeadersTimeoutError)

@mcollina mcollina deleted the fix/5087-h2-timeout-errors branch

May 28, 2026 08:12

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

[ Show hidden characters]({{ revealButtonHref }})