Created
June 28, 2017 22:02
-
-
Save and-megan/d234875541e88f4a8185adecb4b79734 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ignoreRemoteUncaught(isUncaught, args, payload) { | |
try { | |
var filename = payload.body.trace.frames[0].filename; | |
if (isUncaught && !filename.match(/^https?:\/\/www\.mycompany\.com/)) { | |
// Ignore uncaught errors that are not from www.mycompany.com. | |
return true; | |
} | |
} catch (e) { | |
// Most likely there was no filename or the frame doesn't exist. | |
} | |
return false; | |
} | |
Rollbar.configure({checkIgnore: ignoreRemoteUncaught}); | |
// or... | |
_rollbarConfig({ | |
// ... | |
checkIgnore: ignoreRemoteUncaught | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment