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

ref(serverless): Remove rethrowAfterCapture use in AWS lambda wrapper #4448

Merged
merged 2 commits into from
Jan 25, 2022

Conversation

lobsterkatie
Copy link
Member

@lobsterkatie lobsterkatie commented Jan 24, 2022

This PR removes the use of the rethrowAfterCapture option from the AWS handler-wrapping function @sentry/serverless provides. Without its use, the code follows the same path as it has been when the option has been set to its default value, which is true. Though this is technically a breaking change for anyone who currently has it set to false,

a) the option has never been documented,
b) it never should have existed in the first place (we do error monitoring, not error handling, meaning there should be no question as to whether we rethrow the error after recording it),
c) of all of the public projects on GH, only three are using it set explicitly to true, and zero are using it set to false.

For the three projects using it set to true, there is no behavior change. Further, since all three are written in TS, the option hasn't been removed from the WrapperOptions type, so that their continuing to pass it doesn’t cause type errors. It has been made optional, though, so that our non-use of it also doesn't cause type errors. There's also a TODO so that we remember to remove it in v7.

Fixes #3364.

@lobsterkatie lobsterkatie force-pushed the kmclb-serverless-remove-no-rethrow-option branch from 99e6264 to 353eff4 Compare January 24, 2022 19:10
@github-actions
Copy link
Contributor

github-actions bot commented Jan 24, 2022

size-limit report

Path Base Size (5c75be0) Current Size Change
@sentry/browser - CDN Bundle (gzipped) 19.68 KB 19.68 KB +0.01% 🔺
@sentry/browser - CDN Bundle (minified) 62.85 KB 62.86 KB +0.01% 🔺
@sentry/browser - Webpack 22.2 KB 22.2 KB 0%
@sentry/browser - Webpack - gzip = false 75.99 KB 75.99 KB 0%
@sentry/react - Webpack 22.24 KB 22.24 KB 0%
@sentry/nextjs Client - Webpack 46.22 KB 46.22 KB 0%
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 28.21 KB 28.22 KB +0.01% 🔺

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Abhijeet Prasad <aprasad@sentry.io>
@lobsterkatie lobsterkatie merged commit 4edac41 into master Jan 25, 2022
@lobsterkatie lobsterkatie deleted the kmclb-serverless-remove-no-rethrow-option branch January 25, 2022 00:27
AbhiPrasad added a commit that referenced this pull request Mar 18, 2024
…11126)

The `rethrowAfterCapture` option was deprecated in
#4448, which was
released in `6.17.2`. This finally removes the option.
cadesalaberry pushed a commit to cadesalaberry/sentry-javascript that referenced this pull request Apr 19, 2024
…etsentry#11126)

The `rethrowAfterCapture` option was deprecated in
getsentry#4448, which was
released in `6.17.2`. This finally removes the option.
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.

Sentry.AWSLambda.wrapHandler is incorrectly marked as returning TResult | undefined
2 participants