Skip to content
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

How to ignore errors #117

Closed
akashnimare opened this issue Sep 24, 2018 · 4 comments
Closed

How to ignore errors #117

akashnimare opened this issue Sep 24, 2018 · 4 comments
Assignees

Comments

@akashnimare
Copy link

I'm having a hard time ignoring the errors. Can somebody tell me the correct configuration to ignore particular error cc @HazAT.

@HazAT
Copy link
Member

HazAT commented Sep 24, 2018

Should work like this:

Sentry.init({
  dsn: "__DSN__",
  // An array of strings or regexps that'll be used to ignore specific errors based on their type/message
  ignoreErrors: [/Error_\d\d/, "RangeError"],
});

@HazAT HazAT self-assigned this Sep 24, 2018
@akashnimare
Copy link
Author

Hmm, this is what I'm using -

const { init, captureException } = require('@sentry/electron');
const isDev = require('electron-is-dev');

const sentryInit = () => {
	if (!isDev) {
		init({
			dsn: 'DSNHERE',
			ignoreErrors: ['Network failed']
		});
	}
};

module.exports = {
	sentryInit,
	captureException
};

Let me see if this works. Also, is there any way to disable the complete console logs here like I don't want to send the console log to the Sentry.

@tkharuk
Copy link

tkharuk commented Jan 2, 2019

@akashnimare

autoBreadcrumbs: {
    'console': false
}

https://docs.sentry.io/clients/javascript/config/

@timfish
Copy link
Collaborator

timfish commented Feb 16, 2022

We have just released v3.0.0 of the SDK which includes a lot of changes and improvements since this issue was opened.

If you can still reproduce this with v3, please open a new issue and I'll look into it.

@timfish timfish closed this as completed Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants