Skip to content

Sentry.captureException is not a function #7441

Closed
@maxpain

Description

@maxpain

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using? If you use the CDN bundles, please specify the exact bundle (e.g. bundle.tracing.min.js) in your SDK setup.

@sentry/serverless

SDK Version

7.43.0

Framework Version

No response

Link to Sentry event

No response

SDK Setup

import * as Sentry from '@sentry/serverless'

Sentry.GCPFunction.init({
	dsn: '',
	environment: process.env.NODE_ENV,
})

Steps to Reproduce

Sentry.captureException(new Error('test'))

Expected Result

Don't crash

Actual Result

Crash

TypeError: Sentry.captureException is not a function
    at file:///Users/maxpain/dev/gptaskbot/src/index.ts:64:8
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Metadata

Metadata

Assignees

Labels

Package: serverlessIssues related to the Sentry Serverless SDK

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions