feat(node): Capture SystemError context and remove paths from message#17331
Merged
AbhiPrasad merged 13 commits intodevelopfrom Aug 12, 2025
Merged
feat(node): Capture SystemError context and remove paths from message#17331AbhiPrasad merged 13 commits intodevelopfrom
SystemError context and remove paths from message#17331AbhiPrasad merged 13 commits intodevelopfrom
Conversation
AbhiPrasad
reviewed
Aug 5, 2025
| for (const exception of event.exception?.values || []) { | ||
| if (exception.value) { | ||
| if (error.path && exception.value.includes(error.path)) { | ||
| exception.value = exception.value.replace(`'${error.path}'`, '').trim(); |
Contributor
There was a problem hiding this comment.
I wonder if we should expose an integration option to control this replacement as well
Collaborator
Author
There was a problem hiding this comment.
Ideally I would have used util.getSystemErrorMessage(err) to get the plain message without the paths but it was only added in Node v22
Contributor
size-limit report 📦
|
SystemError context and remove paths from messageSystemError context and remove paths from message
AbhiPrasad
approved these changes
Aug 7, 2025
Contributor
AbhiPrasad
left a comment
There was a problem hiding this comment.
Think we are good to go after we fix bun
…om:getsentry/sentry-javascript into timfish/feat/node-system-error-integration
…om:getsentry/sentry-javascript into timfish/feat/node-system-error-integration
…om:getsentry/sentry-javascript into timfish/feat/node-system-error-integration
Collaborator
Author
|
This is now ready to merge. I might backport to v9... |
Contributor
|
Yeah let's do the v9 backport. |
This was referenced Sep 29, 2025
This was referenced Oct 9, 2025
alxndrsn
pushed a commit
to alxndrsn/odk-central-backend
that referenced
this pull request
Dec 6, 2025
Adds one integration: NodeSystemError For more info, see: getsentry/sentry-javascript#17331
2 tasks
alxndrsn
added a commit
to getodk/central-backend
that referenced
this pull request
Dec 9, 2025
Adds one integration: NodeSystemError For more info, see: getsentry/sentry-javascript#17331
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
resolves #17332
Node.js has a
SystemErrorerror class.This error type contains numerous properties which can be useful for debugging but it also includes many of them in the error message which stops fingerprinting from grouping these errors.
This PR adds a default enabled integration that copies the error properties to a new context and strips paths from the error message.
If the top-level
sendDefaultPiiis not enabled, thepathanddestproperties will not be included.