Open realbugger opened 7 years ago
@ReadmeCritic did you find solution?
i'm trying to integrate airbrake.io
window.addEventListener('error', function(err) {
return airbrake.notify(err);
}, false);
but always error message is Script error.
no more details
any help?
you meant @realbugger
Yup, sorry for that
Did a quick search but didn't find much discussion on this topic. I'm wondering what the best practice for app level error handling and logging. I posted the question here because this is the boilerplate my app is building on.
Regardless how careful I am, occasionally there still will be uncaught errors popping out, and sometimes they just throw the entire app off. In production environment, this is quite undesirable. In the minimum I'd like to have some sort of "catch all" error handling, which should log the error on server side so that I can see what was going on. I came across (this solution) but for some reason the
errorObject
is alwaysnull
so it's pretty much useless. The only thing I changed was to invokestartErrorLog()
incomponentDidMount()
as opposed incomponentWillMount()
, becausewindow
isundefined
incomponentWillMount()
due to server side rendering. It would be helpful if anyone could share anything.