Commit 299106f8 authored by Lyza Danger Gardner's avatar Lyza Danger Gardner

Update sentry config to ignore unhandled fetch exceptions

Fixes #2018
parent 138b2498
......@@ -51,6 +51,8 @@ export function init(config) {
Sentry.init({
dsn: config.dsn,
environment: config.environment,
// Do not log Fetch failures to avoid inundating with unhandled fetch exceptions
ignoreErrors: ['Fetch operation failed'],
release: '__VERSION__', // replaced by versionify
whitelistUrls,
......
......@@ -75,6 +75,20 @@ describe('sidebar/util/sentry', () => {
);
});
it('configures Sentry to ignore Errors with matching the text "Fetch operation failed"', () => {
sentry.init({
dsn: 'test-dsn',
environment: 'dev',
});
assert.calledWith(
fakeSentry.init,
sinon.match({
ignoreErrors: ['Fetch operation failed'],
})
);
});
it('disables the URL whitelist if `document.currentScript` is inaccessible', () => {
fakeDocumentCurrentScript.get(() => null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment