Skip to content

Commit

Permalink
Address pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nicohrubec committed Aug 26, 2024
1 parent abe41f5 commit 0619a5c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions platform-includes/getting-started-use/javascript.nestjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ 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),
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:
`app.useGlobalFilters()` or a filter registered in your app module providers annotated with a `@Catch()` decorator
without arguments), 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:

```javascript {2, 6}
import { Catch, ExceptionFilter } from '@nestjs/common';
Expand All @@ -52,7 +52,7 @@ export class YourCatchAllExceptionFilter implements ExceptionFilter {
```

In case you do not have a global catch-all exception filter, add the `SentryGlobalFilter` to the providers of your main
module. This filter will report all unhandled errors that are not caught by any other error filter to Sentry.
module. This filter will report all unhandled errors to Sentry that are not caught by any other error filter.
**Important:** The `SentryGlobalFilter` needs to be registered before any other exception filters.

```javascript {3, 9}
Expand Down

0 comments on commit 0619a5c

Please sign in to comment.