Skip to content

Commit a78a2d2

Browse files
authored
feat(nestjs): Deprecate @WithSentry in favor of @SentryExceptionCaptured (#14323)
1 parent ca5a704 commit a78a2d2

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
99
## Unreleased
1010

11+
### Deprecated `@WithSentry` in `@sentry/nestjs`
12+
13+
The `@WithSentry` decorator was deprecated. Use `@SentryExceptionCaptured` instead. This is a simple renaming and functionality stays identical.
14+
1115
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
1216

1317
## 8.39.0

docs/migration/draft-v9-migration-guide.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
- Deprecated `debugIntegration`. To log outgoing events, use [Hook Options](https://docs.sentry.io/platforms/javascript/configuration/options/#hooks) (`beforeSend`, `beforeSendTransaction`, ...).
1515
- Deprecated `sessionTimingIntegration`. To capture session durations alongside events, use [Context](https://docs.sentry.io/platforms/javascript/enriching-events/context/) (`Sentry.setContext()`).
1616

17+
## `@sentry/nestjs`
18+
19+
- Deprecated `@WithSentry`. Use `@SentryExceptionCaptured` instead.
20+
1721
## `@sentry/types`
1822

1923
- Deprecated `Request` in favor of `RequestEventData`.

packages/nestjs/src/decorators.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,7 @@ export function SentryExceptionCaptured() {
8383

8484
/**
8585
* A decorator to wrap user-defined exception filters and add Sentry error reporting.
86+
*
87+
* @deprecated This decorator was renamed and will be removed in a future major version. Use `SentryExceptionCaptured` instead.
8688
*/
8789
export const WithSentry = SentryExceptionCaptured;

packages/nestjs/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export { init } from './sdk';
55
export {
66
SentryTraced,
77
SentryCron,
8+
// eslint-disable-next-line deprecation/deprecation
89
WithSentry,
910
SentryExceptionCaptured,
1011
} from './decorators';

0 commit comments

Comments
 (0)