Skip to content

Conversation

@aryamohanan
Copy link
Contributor

@aryamohanan aryamohanan commented Sep 22, 2025

Migrate test setup files from node-fetch to native fetch API (available in Node.js 18+). This change removes the dependency on the node-fetch package in test code and leverages the built-in fetch functionality.

ref https://jsw.ibm.com/browse/INSTA-15850

@aryamohanan aryamohanan self-assigned this Sep 25, 2025
@aryamohanan aryamohanan force-pushed the test-node-fetch branch 2 times, most recently from 8ae3d4d to 9b3dec7 Compare September 30, 2025 11:25
@kirrg001
Copy link
Contributor

kirrg001 commented Oct 2, 2025

'request to http://127.0.0.1:65212/ failed, reason: connect ' +
'ECONNREFUSED 127.0.0.1:65212 -- console.error - should be traced'
));
runAndTrace('exit-span', true, 'fetch failed -- console.error - should be traced'));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Native fetch and node-fetch represent the same failure; they are just surfaced differently.

Native fetch:

  • Throws a TypeError: fetch failed
  • The real cause is nested under error.cause

node-fetch:

  • Throws a FetchError
  • The connection error is exposed directly

@aryamohanan aryamohanan marked this pull request as ready for review January 2, 2026 09:18
@aryamohanan aryamohanan requested a review from a team as a code owner January 2, 2026 09:18
@aryamohanan aryamohanan removed the WIP label Jan 2, 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.

3 participants