Skip to content

fix(core): Enforce linked-error limits across exception groups - #25767

Closed
CheckPickerUpper wants to merge 1 commit into
getsentry:developfrom
CheckPickerUpper:fix/bound-linked-error-groups
Closed

CheckPickerUpper wants to merge 1 commit into
getsentry:developfrom
CheckPickerUpper:fix/bound-linked-error-groups

Conversation

@CheckPickerUpper

Copy link
Copy Markdown

Summary

The linked-errors limit is not enforced for the children of an AggregateError or the sibling chain of a SuppressedError. With @sentry/core 11.8.0, an AggregateError with 100 child errors and limit: 3 produces 101 exceptions instead of at most 4. Current develop has the same behaviour.

This change makes the traversal stop before reading or converting another child once the shared limit is reached, for both AggregateError children and SuppressedError siblings. The default limit of 5, traversal order, parent/child mechanism metadata and the original array-length snapshot are unchanged.

Test plan

  • Before the fix, aggregate-errors.test.ts had 4 targeted failures (limits 1 and 3 captured too many children; a nested cause kept reading an aggregate child after the limit; a nested suppressed error kept reading its later sibling)
  • After the fix, all 24 tests in packages/core/test/lib/utils/aggregate-errors.test.ts pass
  • Formatting and type-aware lint pass for both changed files

Checklist

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (pnpm run lint) & (pnpm run test).
  • Link an issue if there is one related to your pull request. If no issue is linked, one will be auto-generated and linked.

@github-actions github-actions Bot added the external PR from an external contributor label Oct 27, 2026
@Lms24

Lms24 commented Oct 28, 2026

Copy link
Copy Markdown
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.

@Lms24 Lms24 closed this Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external PR from an external contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants