Skip to content

fix(node): Allow for undefined transport to be passed in #15560

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

AbhiPrasad
Copy link
Member

fixes #15558

The Node SDK init options allow for transport to be set as undefined, but this breaks because of an error TypeError: options.transport is not a function.

You can see a reproduction of this here: https://stackblitz.com/edit/stackblitz-starters-phh3lfmy?file=index.ts

To fix this, we make sure we use makeNodeTransport if options.transport is set to undefined.

@AbhiPrasad AbhiPrasad requested a review from a team March 3, 2025 15:17
@AbhiPrasad AbhiPrasad self-assigned this Mar 3, 2025
@AbhiPrasad AbhiPrasad requested review from lforst and Lms24 and removed request for a team March 3, 2025 15:17
@AbhiPrasad AbhiPrasad enabled auto-merge (squash) March 3, 2025 15:39
@AbhiPrasad AbhiPrasad merged commit c08b05b into develop Mar 3, 2025
105 of 106 checks passed
@AbhiPrasad AbhiPrasad deleted the abhi-node-transport-undefined branch March 3, 2025 15:40
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: options.transport is not a function with Sentry.init and transport=undefined
2 participants