Skip to content

Instantly share code, notes, and snippets.

@nnarhinen
Created March 23, 2017 19:51
Show Gist options
  • Save nnarhinen/10f0a4b02888092f1653fec945628387 to your computer and use it in GitHub Desktop.
Save nnarhinen/10f0a4b02888092f1653fec945628387 to your computer and use it in GitHub Desktop.
import Raven from 'raven-js';
if (process.env.NODE_ENV === 'production') {
Raven.config('https://<foo>@app.getsentry.com/<bar>').install();
window.onunhandledrejection = function(data) {
Raven.captureException(data.reason);
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment