-
Notifications
You must be signed in to change notification settings - Fork 0
fix(catchers): validate beforeSend return value to avoid sending invalid payload #46
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
Merged
Dobrunia
merged 21 commits into
master
from
fix/prevent-invalid-payload-from-beforeSend
Feb 10, 2026
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
7541501
fix(catchers): validate beforeSend return value to avoid sending inva…
Dobrunia 824e63c
Merge branch 'master' into fix/prevent-invalid-payload-from-beforeSend
Dobrunia 865a73a
Bump version up to 3.3.1
github-actions[bot] 1b86076
feat(nodejs): hasRequiredEventFields
Dobrunia 1bf5bec
refactor: replace hasRequiredEventFields with isValidEventPayload for…
Dobrunia 344e5c6
chore: update package.json scripts and dependencies, add tests
Dobrunia 78c7e20
docs: enhance README and tests for beforeSend functionality, clarify …
Dobrunia 93bcbb6
chore: update README and types for beforeSend method, clarify return …
Dobrunia 10b3aa7
chore: test getSentPayload
Dobrunia 56e08f3
fix: beforeBreadcrumb
Dobrunia af24c84
Update src/index.ts
Dobrunia 43adc90
Update src/index.ts
Dobrunia f9f608f
Update tests/before-send.test.ts
Dobrunia 4f7e26f
Update tests/before-send.test.ts
Dobrunia 0c66816
Update README.md
Dobrunia 6ee8d70
fix: lint + tests
Dobrunia 3c85530
Update README.md
Dobrunia 2d0c003
Update tests/before-send.test.ts
Dobrunia 915f2d0
Update example/example.js
Dobrunia f1b31d9
Update src/index.ts
Dobrunia afbbae6
fix: lint
Dobrunia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
beforeSendreturnsundefinedornull, the implementation sends the original payload without re-validating it. However, if the user mutated the payload in-place (e.g.,event.title = '') before returning nothing, the invalid mutated payload will still be sent. Consider adding validation of thepayloadvariable after thebeforeSendcall to catch in-place mutations that corrupt the payload. This would prevent sending invalid payloads that could cause the same backend errors this PR aims to fix.