Skip to content

Commit 9e7b949

Browse files
authored
feat(nestjs)!: Remove @WithSentry decorator (#14762)
1 parent ba0ec1e commit 9e7b949

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

docs/migration/v8-to-v9.md

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ It will be removed in a future major version.
108108

109109
### `@sentry/nestjs`
110110

111+
- Removed `WithSentry` decorator. Use `SentryExceptionCaptured` instead.
111112
- Removed `SentryService`.
112113
If you are using `@sentry/nestjs` you can safely remove any references to the `SentryService`.
113114
If you are using another package migrate to `@sentry/nestjs` and remove the `SentryService` afterwards.

packages/nestjs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ decorator will report all unexpected errors that are received by your global err
7474

7575
```typescript
7676
import { Catch, ExceptionFilter } from '@nestjs/common';
77-
import { WithSentry } from '@sentry/nestjs';
77+
import { SentryExceptionCaptured } from '@sentry/nestjs';
7878

7979
@Catch()
8080
export class YourCatchAllExceptionFilter implements ExceptionFilter {

packages/nestjs/src/decorators.ts

-7
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,3 @@ export function SentryExceptionCaptured() {
7474
return descriptor;
7575
};
7676
}
77-
78-
/**
79-
* A decorator to wrap user-defined exception filters and add Sentry error reporting.
80-
*
81-
* @deprecated This decorator was renamed and will be removed in a future major version. Use `SentryExceptionCaptured` instead.
82-
*/
83-
export const WithSentry = SentryExceptionCaptured;

packages/nestjs/src/index.ts

+2-8
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ export * from '@sentry/node';
22

33
export { nestIntegration } from './integrations/nest';
44

5-
export { init, getDefaultIntegrations } from './sdk';
5+
export { getDefaultIntegrations, init } from './sdk';
66

7-
export {
8-
SentryTraced,
9-
SentryCron,
10-
// eslint-disable-next-line deprecation/deprecation
11-
WithSentry,
12-
SentryExceptionCaptured,
13-
} from './decorators';
7+
export { SentryCron, SentryExceptionCaptured, SentryTraced } from './decorators';

0 commit comments

Comments
 (0)