GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(nestjs): Exception filters in main app module are not being executed by nicohrubec · Pull Request #13278 · getsentry/sentry-javascript

Conversation

@nicohrubec

@nicohrubec nicohrubec commented Aug 8, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

ref

This PR moves the SentryGlobalFilter out of the root module, which led to the filter overriding user exception filters in certain scenarios. Now there is two ways to setup sentry error monitoring:

  • If users have no catch-all exception filter in their application they add the SentryGlobalFilter as a provider in their main module.
  • If users have a catch-all exception filter (annotated with @Catch() they can use the newly introduced SentryCaptureException() decorator to capture alle exceptions caught by this filter.

Testing:
Added a new sample application to test the second setup option and expanded the test suite in general.

Side note:

  • Also removed the @sentry/microservices dependency again, since it does not come out of the box with every nest application so we cannot rely on it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nicohrubec
Add test that demonstrates wrong behavior
6e6b32e
@nicohrubec nicohrubec self-assigned this Aug 8, 2024
nicohrubec added 4 commits August 8, 2024 15:01
@nicohrubec
Use example exception instead of bad request
fd3a30a
@nicohrubec
Rename
1bcaf37
@nicohrubec
Add local filter test
22eadbe
@nicohrubec
Fix tests
61d5fe6
@github-actions

github-actions Bot commented Aug 8, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
@sentry/browser 22.5 KB (0%)
@sentry/browser (incl. Tracing) 34.85 KB (0%)
@sentry/browser (incl. Tracing, Replay) 71.18 KB (0%)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 64.45 KB (0%)
@sentry/browser (incl. Tracing, Replay with Canvas) 75.53 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) 88.17 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 90 KB (0%)
@sentry/browser (incl. metrics) 26.81 KB (0%)
@sentry/browser (incl. Feedback) 39.47 KB (0%)
@sentry/browser (incl. sendFeedback) 27.13 KB (0%)
@sentry/browser (incl. FeedbackAsync) 31.79 KB (0%)
@sentry/react 25.26 KB (0%)
@sentry/react (incl. Tracing) 37.83 KB (0%)
@sentry/vue 26.65 KB (0%)
@sentry/vue (incl. Tracing) 36.67 KB (0%)
@sentry/svelte 22.64 KB (0%)
CDN Bundle 23.73 KB (0%)
CDN Bundle (incl. Tracing) 36.49 KB (0%)
CDN Bundle (incl. Tracing, Replay) 70.81 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) 76.06 KB (0%)
CDN Bundle - uncompressed 69.61 KB (0%)
CDN Bundle (incl. Tracing) - uncompressed 108.27 KB (0%)
CDN Bundle (incl. Tracing, Replay) - uncompressed 219.52 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 232.41 KB (0%)
@sentry/nextjs (client) 37.59 KB (0%)
@sentry/sveltekit (client) 35.45 KB (0%)
@sentry/node 115.61 KB (0%)
@sentry/node - without tracing 90 KB (0%)
@sentry/aws-serverless 99.42 KB (0%)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

nicohrubec added 7 commits August 9, 2024 10:21
@nicohrubec
Start on base exception filter patch
885fb6b
@nicohrubec
Basic patch for base exception filter seems to work (we can log somet…
d4ab597
…hing)
@nicohrubec
This works! (I think)
c9b690f
@nicohrubec
Adding correct logic to patch
e73698a
@nicohrubec
Cleanup
f71297e
@nicohrubec
Fix tests to reflect new working state
1c87a97
@nicohrubec
Remove nest microservice dependency
83998d2
@nicohrubec nicohrubec mentioned this pull request Aug 12, 2024
feat(nestjs): Filter RPC exceptions #13227
Merged
nicohrubec added 2 commits August 12, 2024 10:51
@nicohrubec
Add docstrings and improve deprecation message
5be4440
@nicohrubec
Pass all arguments
daf1156
@wodCZ

wodCZ commented Aug 12, 2024

Copy link
Copy Markdown

Feel free to ping me if you'd like testers for this. I have two NestJS projects in production running on various setups:

  • NestJS + Fastify + Mercurius GraphQL driver (this one breaks a lot with recent @sentry/node or @sentry/nestjs, something about res.reply not being a function when any error happens)
  • NestJS + Express + TsRest Nest (this one works quite fine with recent releases)

Thank you for pushing the NestJS integration forward, very much appreciated ❤️

nicohrubec reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

nicohrubec added 7 commits August 12, 2024 11:22
@nicohrubec
Add test for instrumentation in module registered before Sentry
468fb30
@nicohrubec
Lint2
1f47da1
@nicohrubec
Remove note about registration order from readme
75058b4
@nicohrubec
Add tests to node sdk
20891b3
@nicohrubec
Rename error isntrumentation
6d1a150
@nicohrubec
Default base filter to undefined
ddf23b2
@nicohrubec
Add comment
2b5d119
@nicohrubec
nicohrubec marked this pull request as ready for review August 12, 2024 11:11
@nicohrubec
nicohrubec requested review from a team, s1gr1d and stephanie-anderson and removed request for a team August 12, 2024 11:12
nicohrubec added 2 commits August 13, 2024 15:17
@nicohrubec
Make decorator nicer
45de32e
@nicohrubec
Update readme
0b49d0d
@nicohrubec
nicohrubec marked this pull request as ready for review August 13, 2024 13:49
Luca Forstner and others added 2 commits August 13, 2024 14:28
Luca Forstner
Update readme
570de0e
@nicohrubec
Remove useless files
242e62e
lforst
lforst approved these changes Aug 13, 2024
View reviewed changes
Comment thread packages/nestjs/src/helpers.ts
*
* @returns `true` if the exception is expected and should not be reported to Sentry, otherwise `false`.
*/
export function isExpectedError(exception: unknown): boolean {

@lforst lforst Aug 13, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

m: Rename to isProbablyNestjsHttpException()?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@nicohrubec nicohrubec Aug 13, 2024

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I don't think that's a good name because it's already responsible for filtering both RpcExceptions and HttpExceptions and maybe others in the future so should be a more general name

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/node/src/integrations/tracing/nest/sentry-nest-instrumentation.ts
* This hooks into the @Injectable decorator, which is applied on class middleware, interceptors and guards.
* This hooks into
* 1. @Injectable decorator, which is applied on class middleware, interceptors and guards.
* 2. @Catch decorator, which is applied on exception filters.

@lforst lforst Aug 13, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This is left over I think

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@nicohrubec nicohrubec Aug 13, 2024

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

no I forgot to update that comment when I added the exception filter tracing so that's fine

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lforst reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
lforst
lforst approved these changes Aug 13, 2024
View reviewed changes
@nicohrubec

nicohrubec commented Aug 13, 2024

Copy link
Copy Markdown
Member Author

@wodCZ Thanks for offering to help with testing! I'll be merging this PR now to fix some issues we are seeing with the nest SDK and also the dependency on @nestjs/microservices is resolved then. If you have time to test it in your apps either directly on develop or with the next release that would be amazing. If you find anything let us know and we will fix it :)

wodCZ reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nicohrubec
nicohrubec merged commit 51ef02d into develop Aug 13, 2024
@nicohrubec
nicohrubec deleted the nh/nest-global-filter-test branch August 13, 2024 15:31
Zen-cronic pushed a commit to Zen-cronic/sentry-javascript that referenced this pull request Aug 26, 2024
@nicohrubec @Zen-cronic
fix(nestjs): Exception filters in main app module are not being execu…
0c06d16
…ted (getsentry#13278)

[ref](getsentry#12351)

This PR moves the `SentryGlobalFilter` out of the root module, which led
to the filter overriding user exception filters in certain scenarios.
Now there is two ways to setup sentry error monitoring:
- If users have no catch-all exception filter in their application they
add the `SentryGlobalFilter` as a provider in their main module.
- If users have a catch-all exception filter (annotated with `@Catch()`
they can use the newly introduced `SentryCaptureException()` decorator
to capture alle exceptions caught by this filter.

Testing:
Added a new sample application to test the second setup option and
expanded the test suite in general.

Side note:
- Also removed the `@sentry/microservices` dependency again, since it
does not come out of the box with every nest application so we cannot
rely on it.
@bagulm123 bagulm123 mentioned this pull request Sep 18, 2024
[Snyk] Upgrade: , , , chart.js, classnames, cytoscape, next, typescript bagulm123/komiser#20
Open
@onsails onsails mentioned this pull request Sep 18, 2024
[Snyk] Upgrade: , , , next haqq-network/islamic-website#37
Open
@mohamed-helmy22020 mohamed-helmy22020 mentioned this pull request Sep 18, 2024
[Snyk] Upgrade @sentry/nextjs from 8.26.0 to 8.27.0 mohamed-helmy22020/banking#4
Open
@gokulk16 gokulk16 mentioned this pull request Sep 23, 2024
[Snyk] Upgrade: , gokulk16/type-to-calculate-web#40
Closed
@q1blue q1blue mentioned this pull request Sep 24, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.27.0 https-quantumblockchainai-atlassian-net/ossinsight#893
Open
This was referenced Sep 24, 2024
[Snyk] Upgrade @sentry/browser from 8.25.0 to 8.27.0 gokulk16/type-to-calculate-web#42
Closed
[Snyk] Upgrade @sentry/browser from 8.25.0 to 8.28.0 gokulk16/type-to-calculate-web#44
Closed
@wkylin wkylin mentioned this pull request Sep 25, 2024
[Snyk] Upgrade @sentry/react from 8.27.0 to 8.28.0 wkylin/pro-react-admin#425
Closed
@FengShangWuQi FengShangWuQi mentioned this pull request Sep 27, 2024
[Snyk] Upgrade @sentry/gatsby from 7.20.0 to 8.28.0 FengShangWuQi/fengshangwuqi.github.io#1923
Closed
@q1blue q1blue mentioned this pull request Sep 27, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.28.0 https-quantumblockchainai-atlassian-net/ossinsight#899
Open
@tristanrobert tristanrobert mentioned this pull request Sep 28, 2024
chore(Snyk): Upgrade @sentry/browser from 8.27.0 to 8.28.0 MTES-MCT/ecobalyse#775
Merged
@q1blue q1blue mentioned this pull request Sep 30, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.29.0 https-quantumblockchainai-atlassian-net/ossinsight#904
Open
@wkylin wkylin mentioned this pull request Oct 1, 2024
[Snyk] Upgrade @sentry/react from 8.27.0 to 8.29.0 wkylin/pro-react-admin#436
Closed
@bagulm123 bagulm123 mentioned this pull request Oct 1, 2024
[Snyk] Upgrade @sentry/react from 8.22.0 to 8.29.0 bagulm123/komiser#23
Open
vjousse pushed a commit to MTES-MCT/ecobalyse that referenced this pull request Oct 1, 2024
@tristanrobert @snyk-bot
chore(Snyk): Upgrade @sentry/browser from 8.27.0 to 8.28.0 (#775)
cea4b83
![snyk-top-banner](https://github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)


<h3>Snyk has created this PR to upgrade @sentry/browser from 8.27.0 to
8.28.0.</h3>

:information_source: Keep your dependencies up-to-date. This makes it
easier to fix existing vulnerabilities and to more quickly identify and
fix newly disclosed vulnerabilities when they affect your project.

<hr/>


- The recommended version is **1 version** ahead of your current
version.

- The recommended version was released on **25 days ago**.



<details>
<summary><b>Release notes</b></summary>
<br/>
  <details>
    <summary>Package name: <b>@sentry/browser</b></summary>
    <ul>
      <li>
<b>8.28.0</b> - <a
href="https://github.com/getsentry/sentry-javascript/releases/tag/8.28.0">2024-09-03</a></br><h3>Important
Changes</h3>
<ul>
<li><strong>Beta release of official NestJS SDK</strong></li>
</ul>
<p>This release contains the beta version of <code>@
sentry/nestjs</code>! For details on how to use it, check out the<br>
<a
href="https://github.com/getsentry/sentry-javascript/blob/master/packages/nestjs/README.md">README</a>.
Any feedback/bug reports<br>
are greatly appreciated, please reach out on GitHub.</p>
<ul>
<li><strong>fix(browser): Remove faulty LCP, FCP and FP normalization
logic (<a class="issue-link js-issue-link" data-error-text="Failed to
load title" data-id="2491960592" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13502"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13502/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13502">#13502</a>)</strong></li>
</ul>
<p>This release fixes a bug in the <code>@ sentry/browser</code> package
and all SDKs depending on this package (e.g. <code>@
sentry/react</code><br>
or <code>@ sentry/nextjs</code>) that caused the SDK to send incorrect
web vital values for the LCP, FCP and FP vitals. The SDK<br>
previously incorrectly processed the original values as they were
reported from the browser. When updating your SDK to<br>
this version, you might experience an increase in LCP, FCP and FP
values, which potentially leads to a decrease in your<br>
performance score in the Web Vitals Insights module in Sentry. This is
because the previously reported values were<br>
smaller than the actually measured values. We apologize for the
inconvenience!</p>
<h3>Other Changes</h3>
<ul>
<li>feat(nestjs): Add <code>SentryGlobalGraphQLFilter</code> (<a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="2498873205" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13545"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13545/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13545">#13545</a>)</li>
<li>feat(nestjs): Automatic instrumentation of nestjs interceptors after
route execution (<a class="issue-link js-issue-link"
data-error-text="Failed to load title" data-id="2453558373"
data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13264"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13264/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13264">#13264</a>)</li>
<li>feat(nextjs): Add <code>bundleSizeOptimizations</code> to build
options (<a class="issue-link js-issue-link" data-error-text="Failed to
load title" data-id="2461140938" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13323"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13323/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13323">#13323</a>)</li>
<li>feat(nextjs): Stabilize <code>captureRequestError</code> (<a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="2500682873" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13550"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13550/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13550">#13550</a>)</li>
<li>feat(nuxt): Wrap config in nuxt context (<a class="issue-link
js-issue-link" data-error-text="Failed to load title"
data-id="2486658763" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13457"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13457/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13457">#13457</a>)</li>
<li>feat(profiling): Expose profiler as top level primitive (<a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="2492896219" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13512"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13512/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13512">#13512</a>)</li>
<li>feat(replay): Add layout shift to CLS replay data (<a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="2466359020" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13386"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13386/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13386">#13386</a>)</li>
<li>feat(replay): Upgrade rrweb packages to 2.26.0 (<a class="issue-link
js-issue-link" data-error-text="Failed to load title"
data-id="2489549947" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13483"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13483/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13483">#13483</a>)</li>
<li>fix(cdn): Do not mangle _metadata (<a class="issue-link
js-issue-link" data-error-text="Failed to load title"
data-id="2473467027" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13426"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13426/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13426">#13426</a>)</li>
<li>fix(cdn): Fix SDK source for CDN bundles (<a class="issue-link
js-issue-link" data-error-text="Failed to load title"
data-id="2489085687" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13475"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13475/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13475">#13475</a>)</li>
<li>fix(nestjs): Check arguments before instrumenting with <code>@
Injectable</code> (<a class="issue-link js-issue-link"
data-error-text="Failed to load title" data-id="2498819596"
data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13544"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13544/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13544">#13544</a>)</li>
<li>fix(nestjs): Ensure exception and host are correctly passed on when
using @ WithSentry (<a class="issue-link js-issue-link"
data-error-text="Failed to load title" data-id="2501912092"
data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13564"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13564/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13564">#13564</a>)</li>
<li>fix(node): Suppress tracing for transport request execution rather
than transport creation (<a class="issue-link js-issue-link"
data-error-text="Failed to load title" data-id="2491355594"
data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13491"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13491/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13491">#13491</a>)</li>
<li>fix(replay): Consider more things as DOM mutations for dead clicks
(<a class="issue-link js-issue-link" data-error-text="Failed to load
title" data-id="2493890628" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13518"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13518/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13518">#13518</a>)</li>
<li>fix(vue): Correctly obtain component name (<a class="issue-link
js-issue-link" data-error-text="Failed to load title"
data-id="2490176912" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13484"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13484/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13484">#13484</a>)</li>
</ul>
<p>Work in this release was contributed by <a class="user-mention
notranslate" data-hovercard-type="user"
data-hovercard-url="/users/leopoldkristjansson/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://github.com/leopoldkristjansson">@ leopoldkristjansson</a>,
<a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/mhuggins/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://github.com/mhuggins">@ mhuggins</a> and <a
class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/filips123/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://github.com/filips123">@ filips123</a>. Thank you for
your<br>
contributions!</p>
      </li>
      <li>
<b>8.27.0</b> - <a
href="https://github.com/getsentry/sentry-javascript/releases/tag/8.27.0">2024-08-27</a></br><h3>Important
Changes</h3>
<ul>
<li>
<p><strong>fix(nestjs): Exception filters in main app module are not
being executed (<a class="issue-link js-issue-link"
data-error-text="Failed to load title" data-id="2455715839"
data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13278"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13278/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13278">#13278</a>)</strong></p>
<p>With this release nestjs error monitoring is no longer automatically
set up after adding the <code>SentryModule</code> to your<br>
application, which led to issues in certain scenarios. You will now have
to either add the <code>SentryGlobalFilter</code> to<br>
your main module providers or decorate the <code>catch()</code> method
in your existing global exception filters with the newly<br>
released <code>@ WithSentry()</code> decorator. See the <a
href="https://docs.sentry.io/platforms/javascript/guides/nestjs/"
rel="nofollow">docs</a> for<br>
more details.</p>
</li>
</ul>
<h3>Other Changes</h3>
<ul>
<li>feat: Add options for passing nonces to feedback integration (<a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="2463099308" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13347"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13347/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13347">#13347</a>)</li>
<li>feat: Add support for SENTRY_SPOTLIGHT env var in Node (<a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="2461216903" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13325"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13325/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13325">#13325</a>)</li>
<li>feat(deps): bump @ prisma/instrumentation from 5.17.0 to 5.18.0 (<a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="2461290821" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13327"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13327/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13327">#13327</a>)</li>
<li>feat(feedback): Improve error message for 403 errors (<a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="2476011686" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13441"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13441/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13441">#13441</a>)</li>
<li>fix(deno): Don't rely on <code>Deno.permissions.querySync</code> (<a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="2465617012" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13378"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13378/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13378">#13378</a>)</li>
<li>fix(replay): Ensure we publish replay CDN bundles (<a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="2475611875" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#13437"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/13437/hovercard"
href="https://github.com/getsentry/sentry-javascript/pull/13437">#13437</a>)</li>
</ul>
<p>Work in this release was contributed by <a class="user-mention
notranslate" data-hovercard-type="user"
data-hovercard-url="/users/charpeni/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://github.com/charpeni">@ charpeni</a>. Thank you for your
contribution!</p>
      </li>
    </ul>
from <a
href="https://github.com/getsentry/sentry-javascript/releases">@sentry/browser
GitHub release notes</a>
  </details>
</details>

---

> [!IMPORTANT]
>
> - Check the changes in this PR to ensure they won't cause issues with
your project.
> - This PR was automatically created by Snyk using the credentials of a
real user.

---

**Note:** _You are seeing this because you or someone else with access
to this repository has authorized Snyk to open upgrade PRs._

**For more information:** <img
src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiJkODVjYTllMS0yOGRmLTRmMmQtOWViYi02MmYzMjcwMDQ3OWUiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6ImQ4NWNhOWUxLTI4ZGYtNGYyZC05ZWJiLTYyZjMyNzAwNDc5ZSJ9fQ=="
width="0" height="0"/>

> - 🧐 [View latest project
report](https://app.snyk.io/org/mtes-mct/project/8a1190df-0364-4a9a-93bd-a9f28b54daf6?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 📜 [Customise PR
templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates)
> - 🛠 [Adjust upgrade PR
settings](https://app.snyk.io/org/mtes-mct/project/8a1190df-0364-4a9a-93bd-a9f28b54daf6/settings/integration?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 🔕 [Ignore this dependency or unsubscribe from future upgrade
PRs](https://app.snyk.io/org/mtes-mct/project/8a1190df-0364-4a9a-93bd-a9f28b54daf6/settings/integration?pkg&#x3D;@sentry/browser&amp;utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)

[//]: #
'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"@sentry/browser","from":"8.27.0","to":"8.28.0"}],"env":"prod","hasFixes":false,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":[],"prId":"d85ca9e1-28df-4f2d-9ebb-62f32700479e","prPublicId":"d85ca9e1-28df-4f2d-9ebb-62f32700479e","packageManager":"npm","priorityScoreList":[],"projectPublicId":"8a1190df-0364-4a9a-93bd-a9f28b54daf6","projectUrl":"https://app.snyk.io/org/mtes-mct/project/8a1190df-0364-4a9a-93bd-a9f28b54daf6?utm_source=github&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":[],"type":"auto","upgrade":[],"upgradeInfo":{"versionsDiff":1,"publishedDate":"2024-09-03T10:33:13.421Z"},"vulns":[]}'

Co-authored-by: snyk-bot <[email protected]>
@q1blue q1blue mentioned this pull request Oct 1, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.30.0 https-quantumblockchainai-atlassian-net/ossinsight#909
Open
@wkylin wkylin mentioned this pull request Oct 2, 2024
[Snyk] Upgrade @sentry/react from 8.27.0 to 8.30.0 wkylin/pro-react-admin#440
Closed
@KeeghanM KeeghanM mentioned this pull request Oct 3, 2024
[Snyk] Upgrade @sentry/react from 8.26.0 to 8.30.0 KeeghanM/chess-training-app#99
Merged
@hartbit hartbit mentioned this pull request Feb 25, 2026
[NestJS] SentryGlobalFilter silently drops non-NestJS exceptions that have a status or error property (e.g. AxiosError) #19519
Closed
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@s1gr1d s1gr1d Awaiting requested review from s1gr1d s1gr1d was automatically assigned from getsentry/team-javascript-sdks
@Lms24 Lms24 Awaiting requested review from Lms24
1 more reviewer
@lforst lforst lforst approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@nicohrubec nicohrubec

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

NestJs - setupNestErrorHandler causes exceptions filters to not being called, therefore errors are not being handled

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@nicohrubec @wodCZ @lforst
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.