Repository navigation
fix(core): Enforce linked-error limits across exception groups - #25767
Closed
CheckPickerUpper wants to merge 1 commit into
Closed
CheckPickerUpper wants to merge 1 commit into
CheckPickerUpper wants to merge 1 commit into
Conversation
Member
|
Hi @CheckPickerUpper thanks for opening this PR. Unfortunately I am going to close it. The reason is that this PR doesn't include an issue where this was discussed previously. The limit of 3 is chosen arbitrarily and there's no reasoning given for it. Your PR description looks fully AI-generated. We do not accept these kinds of "blind" contributions. Please read up on our contributing guidelines and file an issue first. Thank you. |
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.
Summary
The linked-errors
limitis not enforced for the children of anAggregateErroror the sibling chain of aSuppressedError. With@sentry/core11.8.0, anAggregateErrorwith 100 child errors andlimit: 3produces 101 exceptions instead of at most 4. Currentdevelophas the same behaviour.This change makes the traversal stop before reading or converting another child once the shared limit is reached, for both
AggregateErrorchildren andSuppressedErrorsiblings. The default limit of 5, traversal order, parent/child mechanism metadata and the original array-length snapshot are unchanged.Test plan
aggregate-errors.test.tshad 4 targeted failures (limits 1 and 3 captured too many children; a nestedcausekept reading an aggregate child after the limit; a nested suppressed error kept reading its later sibling)packages/core/test/lib/utils/aggregate-errors.test.tspassChecklist
pnpm run lint) & (pnpm run test).