Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat(nestjs): Update nestjs error monitoring setup #11141

Merged
merged 3 commits into from
Aug 27, 2024
Merged

Conversation

nicohrubec
Copy link
Contributor

Updates nestjs documentation with a new setup introduced in 8.27. Users now need to manually either add the SentryGlobalFilter or decorate existing global error handlers.

Note: Should be merged after 8.27 is released.

Copy link

vercel bot commented Aug 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
changelog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 26, 2024 9:39am
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 26, 2024 9:39am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
develop-docs ⬜️ Ignored (Inspect) Visit Preview Aug 26, 2024 9:39am

@nicohrubec nicohrubec requested a review from lforst August 26, 2024 08:45
Copy link

codecov bot commented Aug 26, 2024

Bundle Report

Changes will decrease total bundle size by 15 bytes ⬇️

Bundle name Size Change
sentry-docs-server 8.25MB 6 bytes ⬇️
sentry-docs-edge-server 254.34kB 3 bytes ⬇️
sentry-docs-client 6.25MB 6 bytes ⬇️

@@ -35,6 +33,45 @@ import { AppService } from './app.service';
export class AppModule {}
```

In case you are using a global catch-all exception filter (which is either a filter registered with
`app.useGlobalFilters()` or a filter registered in your app module providers annotated with an empty `@Catch()` decorator),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`app.useGlobalFilters()` or a filter registered in your app module providers annotated with an empty `@Catch()` decorator),
`app.useGlobalFilters()` or a filter registered in your app module providers annotated with a `@Catch()` decorator without arguments),

Comment on lines 38 to 39
add a `@WithSentry()` decorator to the `catch()` method of this global error filter. This decorator will report all
unexpected errors that are received by your global error filter to Sentry:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
add a `@WithSentry()` decorator to the `catch()` method of this global error filter. This decorator will report all
unexpected errors that are received by your global error filter to Sentry:
add a `@WithSentry()` decorator to the `catch()` method of this global error filter. This decorator will report all
unexpected errors to Sentry that are received by your global error filter:

@nicohrubec nicohrubec merged commit 83fcfb6 into master Aug 27, 2024
9 checks passed
@nicohrubec nicohrubec deleted the nh/nestjs-setup branch August 27, 2024 13:30
@github-actions github-actions bot locked and limited conversation to collaborators Sep 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants