Skip to content

Commit ce9f196

Browse files
committed
update global filter
1 parent acbb11a commit ce9f196

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

platform-includes/getting-started-use/javascript.nestjs.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,21 @@ module. This filter will report all unhandled errors to Sentry that are not caug
5858
```javascript {filename: app.module.ts} {3, 9}
5959
import { Module } from '@nestjs/common';
6060
import { APP_FILTER } from '@nestjs/core';
61-
import { SentryGlobalFilter } from '@sentry/nestjs/setup';
61+
import { SentryGlobalGenericFilter } from '@sentry/nestjs/setup';
6262

6363
@Module({
6464
providers: [
6565
{
6666
provide: APP_FILTER,
67-
useClass: SentryGlobalFilter,
67+
useClass: SentryGlobalGenericFilter,
6868
},
6969
// ..other providers
7070
],
7171
})
7272
export class AppModule {}
7373
```
7474

75-
**Note:** In NestJS + GraphQL applications replace the `SentryGlobalFilter` with the `SentryGlobalGraphQLFilter`.
75+
**Note:** SentryGlobalGenericFilter will catch both HTTP and GraphQL errors.
7676

7777
By default, exceptions with status code 4xx are not sent to Sentry. If you still want to capture these exceptions, you can do so manually with `Sentry.captureException()`:
7878

0 commit comments

Comments
 (0)