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

fix(node): Skip capturing Hapi Boom error responses. #11151

Merged
merged 3 commits into from Mar 25, 2024

Conversation

onurtemizkan
Copy link
Collaborator

Resolves: #11069

After checking the behaviour, it seems to me that we don't need to capture any Boom responses, as the errors that may cause a 5xx response are already captured by the core logic. To add an option to control this behaviour, we need to update the usage of hapiErrorPlugin, converting it to a function signature, which IMO may not worth doing, as I'm not sure if users in general would need to use it.

This also adds expectError() to the node-integration-tests runner to allow 5xx responses to be tested.

Copy link
Contributor

github-actions bot commented Mar 17, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) 80.86 KB (added)
@sentry/browser (incl. Tracing, Replay) 72.21 KB (added)
@sentry/browser (incl. Tracing, Replay with Canvas) 76 KB (added)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 65.76 KB (added)
@sentry/browser (incl. Tracing) 36.8 KB (added)
@sentry/browser (incl. browserTracingIntegration) 36.8 KB (added)
@sentry/browser (incl. feedbackIntegration) 31.32 KB (added)
@sentry/browser (incl. feedbackModalIntegration) 31.43 KB (added)
@sentry/browser (incl. feedbackScreenshotIntegration) 31.44 KB (added)
@sentry/browser (incl. sendFeedback) 27.41 KB (added)
@sentry/browser 22.57 KB (added)
CDN Bundle (incl. Tracing, Replay, Feedback) 75.2 KB (added)
CDN Bundle (incl. Tracing, Replay) 70.04 KB (added)
CDN Bundle (incl. Tracing) 36.4 KB (added)
CDN Bundle 23.96 KB (added)
CDN Bundle (incl. Tracing, Replay) - uncompressed 220.02 KB (added)
CDN Bundle (incl. Tracing) - uncompressed 109.97 KB (added)
CDN Bundle - uncompressed 70.99 KB (added)
@sentry/react (incl. Tracing, Replay) 72.19 KB (added)
@sentry/react 22.6 KB (added)

@onurtemizkan onurtemizkan force-pushed the onur/hapi-skip-boom-responses branch 4 times, most recently from 762985d to 9b45cec Compare March 21, 2024 13:40
@onurtemizkan onurtemizkan marked this pull request as ready for review March 24, 2024 22:15
@AbhiPrasad AbhiPrasad changed the title ref(node): Skip capturing Hapi Boom error responses. fix(node): Skip capturing Hapi Boom error responses. Mar 25, 2024
@AbhiPrasad AbhiPrasad merged commit 87eed51 into develop Mar 25, 2024
74 checks passed
@AbhiPrasad AbhiPrasad deleted the onur/hapi-skip-boom-responses branch March 25, 2024 15:11
@AbhiPrasad AbhiPrasad mentioned this pull request Mar 25, 2024
AbhiPrasad pushed a commit that referenced this pull request Mar 27, 2024
Resolves: #11069

After checking the behaviour, it seems to me that we don't need to
capture any Boom responses, as the errors that may cause a `5xx`
response are already captured by the core logic. To add an option to
control this behaviour, we need to update the usage of
`hapiErrorPlugin`, converting it to a function signature, which IMO may
not worth doing, as I'm not sure if users in general would need to use
it.

This also adds `expectError()` to the `node-integration-tests` runner to
allow `5xx` responses to be tested.
AbhiPrasad pushed a commit that referenced this pull request Mar 27, 2024
Resolves: #11069

After checking the behaviour, it seems to me that we don't need to
capture any Boom responses, as the errors that may cause a `5xx`
response are already captured by the core logic. To add an option to
control this behaviour, we need to update the usage of
`hapiErrorPlugin`, converting it to a function signature, which IMO may
not worth doing, as I'm not sure if users in general would need to use
it.

This also adds `expectError()` to the `node-integration-tests` runner to
allow `5xx` responses to be tested.
AbhiPrasad added a commit that referenced this pull request Mar 28, 2024
Backport of #11151 to
v7

Co-authored-by: Onur Temizkan <onur@narval.co.uk>
cadesalaberry pushed a commit to cadesalaberry/sentry-javascript that referenced this pull request Apr 19, 2024
Resolves: getsentry#11069

After checking the behaviour, it seems to me that we don't need to
capture any Boom responses, as the errors that may cause a `5xx`
response are already captured by the core logic. To add an option to
control this behaviour, we need to update the usage of
`hapiErrorPlugin`, converting it to a function signature, which IMO may
not worth doing, as I'm not sure if users in general would need to use
it.

This also adds `expectError()` to the `node-integration-tests` runner to
allow `5xx` responses to be tested.
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.

Error handling within Hapi Sentry integration
3 participants