GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — linkedErrors limit is not applied to AggregateError / SuppressedError children · Issue #25836 · getsentry/sentry-javascript

linkedErrors limit is not applied to AggregateError / SuppressedError children #25836

New issue
Copy link
New issue
Copy link
Closed
#25873
Closed
linkedErrors limit is not applied to AggregateError / SuppressedError children#25836
#25873
Copy link
Assignees
msonnb
Labels
BugNode.js

Description

@CheckPickerUpper
CheckPickerUpper
opened on Oct 28, 2026
Issue body actions

Is there an existing issue for this?

  • I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
  • I have reviewed the documentation https://docs.sentry.io/
  • I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

11.9.0 (also checked current develop)

Framework Version

No response

Link to Sentry event

No response

Reproduction Example/SDK Setup

const Sentry = require('@sentry/node');

Sentry.init({
  dsn: 'https://[email protected]/0',
  // default linkedErrorsIntegration limit is 5
});

const children = Array.from({ length: 20 }, (_, i) => new Error(`child-${i}`));
Sentry.captureException(new AggregateError(children, 'group'));

Steps to Reproduce

  1. Capture an AggregateError whose errors array is longer than the linked-errors limit (default 5).
  2. Inspect event.exception.values (or the event in Sentry).

The same pattern applies to a long SuppressedError chain via the error / suppressed properties.

In packages/core/src/utils/aggregate-errors.ts, the limit check runs at the start of each recursive call, but the AggregateError.errors and SuppressedError loops still walk every child and prepend each one before that check can stop the walk. Cause chains via key (usually cause) do get capped.

I opened #25767 without an issue first and it was closed — filing here as requested before any further PR.

Expected Result

At most limit + 1 exceptions in event.exception.values (the root plus up to limit linked ones), including when the extras come from AggregateError.errors or SuppressedError.

Actual Result

Every AggregateError child (and every SuppressedError sibling) is turned into an exception. With 20 children and the default limit of 5, you get far more than 6 values.

Happy to open a PR once a maintainer confirms this is wanted.

Activity

  1. linear-code commented on Oct 28, 2026

    @linear-code
    linear-codeBot
    on Oct 28, 2026 – with Linear Code
    More actions

    JS-4032

  2. github-actions
    added
    Node.js
    on Oct 28, 2026
  3. linear-code
    added
    Bug
    on Oct 28, 2026
  4. msonnb
    self-assigned this
    on Oct 29, 2026
  5. msonnb
    closed this as completedin #25873on Oct 29, 2026
  6. msonnb commented on Oct 29, 2026

    @msonnb
    msonnb
    on Oct 29, 2026
    Member
    More actions

    Hey @CheckPickerUpper, thanks for reporting! The fix will be included in our next release.

  7. kashish00208
    added a commit that references this issue on Oct 29, 2026

    fix(core): Enforce linked error limits for aggregate and suppressed e…

    This issue will close once commit 1e3ef41 is merged into the 'develop' branch.
    1e3ef41
  8. github-actions commented on Nov 5, 2026

    @github-actions
    github-actionsBot
    on Nov 5, 2026 – with GitHub Actions
    Contributor
    More actions

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #25873, which was included in the 11.11.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @msonnb
    msonnb

Labels

BugNode.js

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.