Skip to content

fix(redirect): fix throwOnMaxRedirect edge - #5879

Merged
mcollina merged 1 commit into
nodejs:mainfrom
jasnell:jasnell/fixup-throw-on-max-redirect
Sep 24, 2026
Merged

mcollina merged 1 commit into
nodejs:mainfrom
jasnell:jasnell/fixup-throw-on-max-redirect

Conversation

@jasnell

@jasnell jasnell commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

This relates to...

redirect handling

Rationale

When throwOnMaxRedirect is true, and exactly the limit of redirects was hit, the client would throw even if the next response was not a redirect. See the test.

Spotted while I was working on the other redirect fix.

Changes

Features

N/A

Bug Fixes

N/A

Breaking Changes and Deprecations

Status

When throwOnMaxRedirect is true, and exactly the limit
of redirects was hit, the client would throw even if the
next response was not a redirect. This fixes it.

Signed-off-by: James M Snell <jasnell@gmail.com>
@codecov-commenter

codecov-commenter commented Sep 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.90%. Comparing base (8145595) to head (ec00b18).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5879   +/-   ##
=======================================
  Coverage   93.90%   93.90%           
=======================================
  Files         110      110           
  Lines       39901    39907    +6     
=======================================
+ Hits        37470    37476    +6     
  Misses       2431     2431           

☔ View full report in Codecov by Harness.
📢 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 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina
mcollina merged commit 762f3b5 into nodejs:main Sep 24, 2026
37 of 38 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 14, 2026
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.

4 participants