redux-saga: weird error stack trace and error printing
Let say I throw an error in render() of React component, the console output is ok. But if i try console.log(this.a.b.c.d.e.f) instead, the console error message is sent by redux-saga to point out that the error is caused by the last saga even if that saga is well tested, and the stack trace is helpless as it just show the location of the log() utils func in redux-sage source code but not the wrong console.log(this.a.b.c.d.e.f)
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (9 by maintainers)
@yarcub
If what you need is crash reporting, you can attach an error handler to the root saga
Like mentioned on #250, i’m also trying to send all uncaught exceptions to a monitoring system. The problem is when it happens on the same frame as a
puteffect. It would simply be logged byredux-sagaand not reach thewindow.onerrorhandler.@yelouafi, is there an option to disable this behavior and rethrow the exception? Does it makes sense?
@yarcub should be
b/c
runreturns a Task object not a promiseI see, that’s right!
I’ve tried to replace
result.messagein previous code withresult.stackand got:which is fine for me. Is that a good fix for this?