question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

useSentry: Option to exclude errors from reporting

See original GitHub issue

Feature request

There’s no way to exclude errors from being reported. Ideally there could be a configuration filter option to opt-out.

Something like:

useSentry({
  skipError(error) { return error instanceof MyCustomError; }
});

I’d suggest renaming skip to skipOperation if we go with skipError.

Bundling bug

I tried to extend my custom errors from EnvelopError as a workaround, though I was stumped as to why this didn’t work until I realised for some reason it’s actually being bundled into the Sentry plugin, https://unpkg.com/browse/@envelop/sentry@1.3.0/index.mjs so fails the instanceof check, when imported from @envelop/core.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
n1ru4lcommented, Nov 4, 2021

@dburles This will be taken care of by https://github.com/dotansimha/envelop/pull/936. I will let you know once it is merged and released!

2reactions
dburlescommented, Nov 3, 2021

This issue has kind of become two, a bug report for the bundled EnvelopError class and a feature request for a configuration option to skip errors, the latter is the part I am interested in. I would love to help and create a repro for the instanceof issue, but I cannot devote the time to it at the minute. I believe the problem is clear in any case and that it is solved by not bundling mono repo dependencies.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manage Your Error Quota | Sentry Documentation
Learn how to use the tools Sentry provides to control the type and amount of errors that you pay for.
Read more >
Add an exclude option to the search bar · Issue #2646 - GitHub
I need to search level with exclusion option in Sentry. ... it's the matter of meaning, I have error reporting tool as part...
Read more >
Custom Sentry Client for more freedom: How to ignore any ...
We use Sentry for our error reporting, and we love it. ... There are some options for making sentry exclude particular errors:.
Read more >
React Error Handling And Reporting With Error Boundary And ...
Now let's use Sentry to report errors that are caught by our error boundary. Open ErrorBoundary.js and update the following pieces of code....
Read more >
Experience with Frontend Error Tracking Using Sentry.io In ...
... Integrate Sentry in app First error tracking Use Sentry with API ... deploy code with bugs Getting a quick notification about troubles ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found