Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plugin-express] body not showing up in request tab. #620

Closed
azizhk opened this issue Sep 13, 2019 · 2 comments · Fixed by #872
Closed

[plugin-express] body not showing up in request tab. #620

azizhk opened this issue Sep 13, 2019 · 2 comments · Fixed by #872
Labels
bug Confirmed bug released This feature/bug fix has been released

Comments

@azizhk
Copy link

azizhk commented Sep 13, 2019

Screenshot 2019-09-13 at 3 13 52 PM

So I have a POST request which throws an error, but body does not get logged as shown in the image.
The problem is that bugnsag generated the metadata in the middleware instead of the errorHandler. (Don't know why this is done, please don't add overhead and allow application code to run first)

The code over here expects req.body to be an object:

request.body = extractObject(req, 'body')

We use body-parser to create req.body into an object, but that middleware is after the bugsnag middleware. (As bugnsag recommends that the first middleware should be the bugnsags over here)

I've moved the bugsnag middleware to be after body-parser for now. But I would ideally like if bugsnag can move the request metadata creation to the errorHandler.

@mattdyoung
Copy link
Contributor

Hi @azizhk

Thanks for the report. We're taking a look and will decide on the best way forward.

@mattdyoung mattdyoung added the needs discussion Requires internal analysis/discussion label Sep 20, 2019
@bugsnagbot bugsnagbot added the scheduled Work is starting on this feature/bug label Jun 1, 2020
@mattdyoung mattdyoung added bug Confirmed bug and removed needs discussion Requires internal analysis/discussion labels Jun 22, 2020
@tomlongridge tomlongridge linked a pull request Aug 14, 2020 that will close this issue
@abigailbramble
Copy link

Hi @azizhk - we have released a fix for this in v7.2.0.

@abigailbramble abigailbramble added released This feature/bug fix has been released and removed scheduled Work is starting on this feature/bug labels Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug released This feature/bug fix has been released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants