vidit-sh/redux-sentry-middleware

Add a callback?

Opened this issue · 0 comments

Would love the ability to add a callback to execute after the error has been sent to sentry.

In my case, I have middleware = [myErrorCatchingMiddleware, Thunk, reduxSentryMiddleWare]. The function of "myErrorCatchingMiddleware" is to dispatch an update to the store to notify that an uncaught error has occurred, then re-throws the error to be caught again by reduxSentryMiddleware.

The result of this is that the last dispatched action as shown in Sentry is a result of myErrorCatchingMiddleware, as opposed to the actual action that caused the issue.

Thanks for the great module :)