Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
A yesodMiddleware
that notifies Bugsnag of exceptions
yesodMiddleware
is the only way to handle things as actual exceptions. The
alternative, using errorHandler
, means you would only ever see an
"InternalError Text" value.
The main downside to this middleware is that short-circuit responses also come through the middleware as exceptions, and must be filtered. Unless of course you want to notify Bugsnag of 404s and such.
Documentation
bugsnagYesodMiddleware :: (app -> Settings) -> HandlerFor app a -> HandlerFor app a Source #
bugsnagYesodMiddlewareWith :: (Request -> BeforeNotify) -> (app -> Settings) -> HandlerFor app a -> HandlerFor app a Source #