mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
Merge pull request #2655 from paulkaplan/really-fix-sentry
Prevent uncaught errors from going to sentry
This commit is contained in:
commit
f245285c9e
1 changed files with 4 additions and 4 deletions
|
@ -39,11 +39,11 @@ const Sentry = require('@sentry/browser');
|
|||
if (`${process.env.SENTRY_DSN}` !== '') {
|
||||
Sentry.init({
|
||||
dsn: `${process.env.SENTRY_DSN}`,
|
||||
integrations: integrations =>
|
||||
// Do not collect global onerror, only collect specifically from React error boundaries.
|
||||
integrations.filter(i => i.name !== 'GlobalHandlers')
|
||||
// Do not collect global onerror, only collect specifically from React error boundaries.
|
||||
// TryCatch plugin also includes errors from setTimeouts (i.e. the VM)
|
||||
integrations: integrations => integrations.filter(i =>
|
||||
!(i.name === 'GlobalHandlers' || i.name === 'TryCatch'))
|
||||
});
|
||||
window.onerror = () => {}; // Doesn't look like global handlers filtering works, just stub window onerror
|
||||
window.Sentry = Sentry; // Allow GUI access to Sentry via window
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue