Skip to content

fix: preserve electron net request arguments#1393

Merged
timfish merged 1 commit into
getsentry:masterfrom
dogodo-cc:fix/electron-net-forward-request-args
Jun 30, 2026
Merged

fix: preserve electron net request arguments#1393
timfish merged 1 commit into
getsentry:masterfrom
dogodo-cc:fix/electron-net-forward-request-args

Conversation

@dogodo-cc

@dogodo-cc dogodo-cc commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

The Electron net integration wrapped net.request but only forwarded the first argument to the original request method. This made the wrapper non-transparent for callers which use Node-compatible request signatures such as request(options, callback), causing the callback argument to be dropped.

Such as vscode

This updates the wrapper to preserve and forward any additional request arguments while still parsing the first argument for Sentry instrumentation.

Testing

  • ./node_modules/.bin/oxfmt --check src/main/integrations/net-breadcrumbs.ts test/unit/net-trace-propagation.test.ts
  • OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true ./node_modules/.bin/oxlint src/main/integrations/net-breadcrumbs.ts test/unit/net-trace-propagation.test.ts
  • ./node_modules/.bin/vitest run --root=./test/unit net-trace-propagation.test.ts
  • node scripts/update-version.js && ./node_modules/.bin/vitest run --root=./test/unit

@timfish timfish enabled auto-merge (squash) June 30, 2026 11:19
@timfish timfish merged commit 7bc3175 into getsentry:master Jun 30, 2026
309 of 317 checks passed
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.

2 participants