bugsnag-js icon indicating copy to clipboard operation
bugsnag-js copied to clipboard

restify: consider providing original request in beforeSend

Open karthikiyengar opened this issue 6 years ago • 2 comments

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.

karthikiyengar avatar Feb 04 '19 10:02 karthikiyengar

My current solution is to add another middleware after the bugsnag requestHandler to attach the user to the req.bugsnag.

karthikiyengar avatar Feb 04 '19 10:02 karthikiyengar

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.

bengourley avatar Feb 07 '19 09:02 bengourley