Sentry-javascript: Event dropped due to being matched by `ignoreErrors` option. Event: Script error.

Created on 4 Dec 2018  路  6Comments  路  Source: getsentry/sentry-javascript

I'm using @sentry/browser 4.4.1
Using the following basic code (I cleared the dsn):

Sentry.init({
dsn: 'https://[email protected]/1111',
release: version,
environment: environment,
debug: true
})
throw new Error("oops")

Results in the following message:

Sentry Logger [Warn]: Event dropped due to being matched by 'ignoreErrors' option. Event: Script error.

Anyone has an idea why? Is there a way to see which ignoreErrors pattern cause the drop?

Question

All 6 comments

Anyone has an idea why? Is there a way to see which ignoreErrors pattern cause the drop?

Script error. This will be the pattern in this case - https://github.com/getsentry/sentry-javascript/blob/92e0149bcafbfcf15a9dd499c0f3081d57b3103c/packages/core/src/integrations/inboundfilters.ts#L11

See if this may be of some help https://blog.sentry.io/2016/05/17/what-is-script-error

Thanks!, though it looks odd, as the script which create the error, is the one that load and init sentry. I ended up surrounding my code with try/catch and sending specifically the exception using Sentry.captureException(e)

@EyalSi are you able to provide a repro case I could use to debug this? There might be some crossorigin issues maybe?
If not and it's resolved, feel free to close the issue :)

Closing due to inactivity.

@kamilogorek thanks for the pointer. If think this "script error" situation should be mentioned in the SDK documentation, it's a pretty common use case to load JS from a different domain than the website content.

Was this page helpful?
0 / 5 - 0 ratings