Skip to content

NestJS errors throw an internal sentry error #18414

@Asynchronite

Description

@Asynchronite

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using?

@sentry/nestjs

SDK Version

10.29.0

Framework Version

@nestjs/core 11.1.9

Link to Sentry event

No response

Reproduction Example/SDK Setup

import 'dotenv/config';
import * as Sentry from '@sentry/nestjs';

const environment = process.env;
console.log('Instrumenting Sentry...');

Sentry.init({
	// ...
	enabled: environment.API_STAGE != 'dev',
	spotlight: environment.SENTRY_SPOTLIGHT,
	
	// ...
	
	enableLogs: true,
});

// Then elsewhere, when the nest app (Which in this case is a Discord bot) starts up, and an error gets thrown, attached below.

Steps to Reproduce

  1. Init Sentry
  2. Wait for Sentry to start up
  3. In one of the files that has code for the Discord slash command, I run throw new Error("Hello chat!!!"); to test this feature and I get that error.

Expected Result

Expected result is the error gets logged in the console and it gets sent to Sentry and Spotlight.

Actual Result

Instead of that happening, the following thing gets logged, and nothing gets sent to Sentry nor Spotlight:

Image

Additional Context

Some errors still get sent into Sentry, but this sometimes also happens..

Priority

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

Metadata

Metadata

Assignees

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions