pbrisbin / bugsnag-haskell

Bugsnag error reporter for Haskell
10 stars 7 forks source link

updateEventFromWaiRequest #3

Closed pbrisbin closed 6 years ago

pbrisbin commented 6 years ago
updateEventFromWaiRequest :: Wai.Request -> BugsnagRequest -> BugsnagRequest
updateEventFromWaiRequest = -- Copy everything we can

myErrorHandler = do
    request <- waiRequest

    liftIO
        $ notifyBugsnag settings
        $ updateEventFromWaiRequest request
        $ bugsnagEvent [myException]

The BugsnagRequest fields are all Text right now, but we should consider making them whatever the corresponding fields are in Wai.Request since that's super standard.