Skip to content

Dialog shows regardless of the ignoreErrors rules #7732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
glung opened this issue Apr 4, 2023 · 2 comments · Fixed by #7750
Closed
3 tasks done

Dialog shows regardless of the ignoreErrors rules #7732

glung opened this issue Apr 4, 2023 · 2 comments · Fixed by #7750
Labels
Package: angular Issues related to the Sentry Angular SDK

Comments

@glung
Copy link

glung commented Apr 4, 2023

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using? If you use the CDN bundles, please specify the exact bundle (e.g. bundle.tracing.min.js) in your SDK setup.

@sentry/angular

SDK Version

7.46.0

Framework Version

@sentry/angular

Link to Sentry event

No response

SDK Setup

Sentry init

      Sentry.init({
        dsn: '***',
        ignoreErrors: [
          'Error to ignore'
        ]
      })

Angular error handler:

createErrorHandler({
  showDialog: environment.production === false,
})

Steps to Reproduce

  1. Setup Sentry and ignore error
  2. Register the Sentry error handler with showDalog
  3. Fire the ignore - that should be ignored

Expected Result

The error is not sent
The dialog does not show

Actual Result

The error is not sent
The dialog shows

@Lms24
Copy link
Member

Lms24 commented Apr 5, 2023

Hi @glung thanks for reporting! I can reproduce this locally and you're right, we should change this. Currently I'm thinking we can use our newly introduced internal SDK hooks (#7262) to only show the dialog once the event is actually sent.

I'll open a PR with a fix soon.

Note: We'll need to apply the same fix in the React SDK as well.

@glung
Copy link
Author

glung commented Apr 5, 2023

Thx a lot @Lms24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: angular Issues related to the Sentry Angular SDK
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants