You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to integrate rollbar with my Snap web application. I want to log every user error or server error. I want to wrap all the routes using wrapSite.
However, if during thehandler execution a badReq or a serverError occurs then any other code beyond that won't be executed, due to the finishEarly.
The catchFinishWith seems to solve this issue but it works in the Snap monad. It expects a Snap a and return a Snap (Either Response a).
I'd like to know if you add a catchFinishWithHandler :: Handler v k a -> Handler v k (Either Response a). I think it should be similar to bracketHandler which is a wrapper of bracketSnap
The text was updated successfully, but these errors were encountered:
Sorry for the delay on this. I've been really busy. I agree that this seems like a useful thing. Unfortunately I don't have time to look at this right now. If you put together a pull request adding this, I'll be much more likely to get to it.
I want to integrate rollbar with my Snap web application. I want to log every user error or server error. I want to wrap all the routes using
wrapSite
.In my
Site.hs
:In my case
wrapSite
expects a (Handler App App () -> Handler App App ()
). Currently, mylogIntoRollbar
is something like this:However, if during the
handler
execution abadReq
or aserverError
occurs then any other code beyond that won't be executed, due to thefinishEarly
.The
catchFinishWith
seems to solve this issue but it works in theSnap
monad. It expects aSnap a
and return aSnap (Either Response a)
.I'd like to know if you add a
catchFinishWithHandler :: Handler v k a -> Handler v k (Either Response a)
. I think it should be similar tobracketHandler
which is a wrapper ofbracketSnap
The text was updated successfully, but these errors were encountered: