bugsnag-js
bugsnag-js copied to clipboard
restify: consider providing original request in beforeSend
This is also in close connection with #420
For instance, I would like to use the original request to tag along req.user which contains my user details - something that the restify plugin does not do automatically.
The current approach makes the plugin pretty inflexible and the only way I can modify getRequestAndMetaDataFromReq is to fork.
My current solution is to add another middleware after the bugsnag requestHandler to attach the user to the req.bugsnag.
Thanks for the feedback. Your solution sounds reasonable but we'll look at this and see if there's a nicer api we can provide.