fix(node): Use normalizeDepth
when creating an event from unknown input
#5689
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.
This PR makes use of the
normalizeDepth
init option when creating events from an unknown input. It potentially fixes #5687 where a user reported that callingSentry.captureException
with a deep custom object, thenormalizeDepth
isn't respected but the depth defaults to 3.Note: I'm not sure if this behaviour was intentional or if we have a bug. Opened this quick PR with an idea how to fix it. Since I'm gone for the next weeks, reviewer(s) please feel free to change, close or merge this PR! Was just a quick idea.
If we decide to go with this, we might want to apply the same fix to the Browser SDKs event builder.