Skip to content

TypeError: options.transport is not a function with Sentry.init and transport=undefined #15558

Closed
@cs4inctec

Description

@cs4inctec

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

9.2.0

Framework Version

No response

Link to Sentry event

No response

Reproduction Example/SDK Setup

Sentry.init({
        dsn: config.dsn || undefined,
        release: config.release || version || undefined,
        environment: config.environment || undefined,
        integrations: [
          Sentry.extraErrorDataIntegration({
            depth: 10,
            captureErrorCause: true,
          }),
        ],
         transport: config.transport as TransportType,
      });

type TransportType = Sentry.NodeOptions['transport'];

after upgrading from SDK 7 to 9, this error occurs. The Sentry init Api itself is seemingly the same / types didn't change, but when providing an undefined for transport the error is now thrown.

Steps to Reproduce

set transport to undefined

Expected Result

no error

Actual Result

TypeError: options.transport is not a function

Metadata

Metadata

Assignees

Labels

Package: nodeIssues related to the Sentry Node SDK

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions