Skip to content

Conversation

@islandryu
Copy link
Member

@islandryu islandryu commented Nov 13, 2025

Fixes: #60697

Like the issue reporter, I think proxy-related errors should be handled only by the proxy logic.
Otherwise, the same root cause can lead to duplicate errors.

However, there may be cases where an error should also be emitted from within onSocket that I might be overlooking.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/http
  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added http Issues or PRs related to the http subsystem. needs-ci PRs that need a full CI run. labels Nov 13, 2025
@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.54%. Comparing base (04a086a) to head (a2467bd).
⚠️ Report is 27 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #60699      +/-   ##
==========================================
- Coverage   88.54%   88.54%   -0.01%     
==========================================
  Files         703      703              
  Lines      208220   208220              
  Branches    40137    40145       +8     
==========================================
- Hits       184374   184360      -14     
+ Misses      15861    15850      -11     
- Partials     7985     8010      +25     
Files with missing lines Coverage Δ
lib/_http_agent.js 97.32% <100.00%> (-0.01%) ⬇️
lib/_http_client.js 97.36% <100.00%> (+<0.01%) ⬆️

... and 41 files with indirect coverage changes

🚀 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.

@pimterry pimterry added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 13, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 13, 2025
@nodejs-github-bot
Copy link
Collaborator

@islandryu islandryu added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Nov 15, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 15, 2025
@nodejs-github-bot nodejs-github-bot merged commit 2e944d7 into nodejs:main Nov 15, 2025
79 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 2e944d7

@jonathanperret
Copy link

Thank you for the quick fix @islandryu !
I’m not familiar with the backport policy, is there a chance this gets backported to 24.x? Trying to decide whether to deploy a workaround or wait for the next 24.x release.

@islandryu
Copy link
Member Author

I think it should land in 24.12!

targos pushed a commit that referenced this pull request Nov 27, 2025
Fixes: #60697
PR-URL: #60699
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
@rdubigny
Copy link

Hi @islandryu,

It looks like this PR didn’t make it into the 24.12 release.

Do you know if there are plans to backport it anytime soon?

rdubigny added a commit to proconnect-gouv/federation that referenced this pull request Dec 16, 2025
**Problem**

Since enabling Node proxying, we’ve encountered a Node.js bug that
causes the application to crash when an HTTP request is made to an
invalid discovery URL.

See the Node.js PR: nodejs/node#60699

To work around this issue and preserve the previous behavior, we
restored the `global-agent` library to prevent the application from
crashing.

**Proposal**

Remove the usage of `global-agent`.

**Prerequisites**

* Use a patched version of Node.js once it becomes available.
* Restore the previous environment variables in all environments (see:
  proconnect-gouv/infra-legacy#120).
@islandryu
Copy link
Member Author

islandryu commented Dec 18, 2025

Sorry for the confusion.
I misunderstood the timing for backporting to earlier major versions.

According to the backporting guidelines, this non-breaking change first lands in the latest major (v25.x), and is then gradually backported to earlier release lines after it has been in the current major for at least two weeks.
https://github.com/nodejs/node/blob/main/doc/contributing/backporting-to-release-lines.md#criteria-for-backporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. http Issues or PRs related to the http subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ClientRequest emits error event with ERR_PROXY_TUNNEL twice

7 participants