sentry-javascript: ignoreErrors doesnt seems to work
- Review the documentation: https://docs.sentry.io/
- Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- Use the latest release: https://github.com/getsentry/sentry-javascript/releases
- Provide a link to the affected event from your Sentry account
Package + Version
-
@sentry/browser -
@sentry/node -
raven-js -
raven-node(raven for node) - other: cdn(https://browser.sentry-cdn.com/5.14.1/bundle.min.js)
Version:
5.14.1
Description
Sentry.init({
...
ignoreErrors:[
'Extension',
...
],
blacklistUrls:[
/extensions\//i,
/^chrome:\/\//i,
],
...
})
Using the above initialization code, but still caught the Extension error in the window system.

What is the reason?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 33 (15 by maintainers)
I know, based on Sentry docs it “should” work, but somehow it don’t. Hence the confusion 😦(
OMG. Exactly the same issue here. it’s interesting that @pawlarius submitted the same comment 3 hours ago.
When using the debuge test, the error will be intercepted and not reported, but after it is posted online, I don’t know if the error is triggered and the error is indeed reported.
Hi @lforst thanks for that! I tried debug: true but I’m having difficulty in triggering the error.
It may be hard for me to provide a reproduction example since the issue is actually a non critical error from ResizeObserver.
Somehow Sentry has reported this almost 1K now, but I still can’t see any of those error from my local with sentry debug mode enabled.
I checked in the docs, sentry ignoreErrors should be matching partial, but does it work if I put a sentences separated by space?
ResizeObserver spits out it’s errors on the
windowobject which is not logged by default (except by tools like Sentry). Locally, in order to see them you can addwindow.addEventListener('error', function (e) { console.error(e); });they will show up in the console when they occur.We also at first glance had Sentry log a ResizeObserver after it was added to
ignoreErrorsbut it was for sent from the release tag just previous; so double check the version origin not only the timing.@pawlarius There is
debug: trueinSentry.init()that will help in some cases but I recommend that you provide a reproduction example for us to effectively debug your issue.