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

chore(plugin-restify): send body in event.request #1701

Merged
merged 1 commit into from
Mar 11, 2022
Merged

Conversation

djskinner
Copy link
Contributor

@djskinner djskinner commented Mar 10, 2022

Goal

Send the body (if any) as event.request.body. This fixes a bug where the request body was not being included (not even as event.metadata.request.body. This was because those values were being determined when the requestHandler middleware was run, which would be before any body parsing middleware is added, as per our integration instructions, which suggest adding the Bugsnag middleware first.

The changes here are similar to #1292

Design

Better agreement with the notifier spec.

Changeset

  • Collect event data at the right time (on the error handler)
  • Send body as event.request.body

Testing

  • Covered with E2E test
  • Tested using a modified version of the example project after deploying to a local verdaccio instance and depending on that. verified the request body is included in the request tab of the event

@github-actions
Copy link

github-actions bot commented Mar 10, 2022

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 42.31 kB 12.94 kB
After 42.31 kB 12.94 kB
± No change No change

code coverage diff

Coverage values did not change👌.

Total:

Lines Branches Functions Statements
0%(+0%) 0%(+0%) 0%(+0%) 0%(+0%)

Generated by 🚫 dangerJS against e5a4e42

@djskinner djskinner force-pushed the plat-6095 branch 2 times, most recently from 46b417c to bd7d39a Compare March 10, 2022 17:19
@djskinner djskinner marked this pull request as ready for review March 10, 2022 18:25
@djskinner djskinner merged commit 248e5e3 into next Mar 11, 2022
@djskinner djskinner deleted the plat-6095 branch March 11, 2022 09:49
@imjoehaines imjoehaines mentioned this pull request Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants