var quotes = ["", '"', "'"]; var symbols = ['Promise', '$', 'ahoy', 'jQuery', 'I18n', 'moment', 'jigsaw', 'ComboSearch', 'ZiteReader']; var msg_templates = ["X is not defined", "Can't find variable: X", "X is undefined"]; var ignores = []; quotes.forEach(function (q) { symbols.forEach(function (s) { msg_templates.forEach(function (m) { ignores.push(m.replace("X", q + s + q)); }); }); }); Sentry.onLoad(function() { Sentry.init({ dsn: 'https://844eecb5a0da4da99b3918516f5a379d@app.getsentry.com/85290', release: "100de6e2d4d1149d8db5c6dcad9dc231b2443af6", environment: "production", ignoreErrors: ignores.concat([ /ChunkLoadError/, /SecurityError: Failed to read the 'localStorage' property/, /Blocked a frame with origin/, /__firefox__/, /BlockAdBlock/, /DataCloneError/, // Random plugins/extensions 'top.GLOBALS', // See: http://blog.errorception.com/2012/03/tale-of-unfindable-js-error.html 'originalCreateNotification', 'canvas.contentDocument', 'MyApp_RemoveAllHighlights', 'http://tt.epicplay.com', 'http://loading.retry.widdit.com/', 'atomicFindClose', // Facebook borked 'fb_xd_fragment', // ISP "optimizing" proxy - `Cache-Control: no-transform` seems to reduce this. (thanks @acdha) // See http://stackoverflow.com/questions/4113268/how-to-stop-javascript-injection-from-vodafone-proxy 'bmi_SafeAddOnload', 'EBCallBackMessageReceived', // See http://toolbar.conduit.com/Developer/HtmlAndGadget/Methods/JSInjection.aspx 'conduitPage', /License expired/, // https://github.com/getsentry/sentry-javascript/issues/3040 (Chrome mobile on IOS) /undefined is not an object (evaluating 'window.webkit.messageHandlers.selectedDebugHandler.postMessage')/, // bug in mobile safari when parsing json+ld data /null is not an object (evaluating 'Object.prototype.hasOwnProperty.call(o,"telephone")')/, // Old browsers 'ResizeObserver is not defined', // Mobile safari bug /Load failed/, // https://forum.sentry.io/t/unhandledrejection-non-error-promise-rejection-captured-with-value/14062 "Non-Error exception captured", "Non-Error promise rejection captured", "window.matchMedia is not a function" ]), whitelistUrls: [ /https:\/\/veloce\-e\-gusto\.skubacz\.pl\//, /https:\/\/d2sv10hdj8sfwn\.cloudfront\.net\/prod\/pendolino/, /js\-agent\.newrelic\.com/ ] }); });