Skip to content

maxValueLength is not applied for linked errors #8580

Closed
@kamilogorek

Description

@kamilogorek

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser

SDK Version

7.59.2

Framework Version

No response

Link to Sentry event

No response

SDK Setup

No response

Steps to Reproduce

const wat = new Error('this is very long message that should be truncated and will be, this is very long message that should be truncated and will be, this is very long message that should be truncated and will be, this is very long message that should be truncated and will be, this is very long message that should be truncated and will be');

wat.cause = new Error('this is very long message that should be truncated but wont be, this is very long message that should be truncated but wont be, this is very long message that should be truncated but wont be, this is very long message that should be truncated but wont be, this is very long message that should be truncated but wont be');

Sentry.captureException(wat);

This is usually apparent when using React with error boundaries, causing UI to look ugly.

Expected Result

Both exceptions should have their message truncated up to maxValueLength or default 250.

Actual Result

Only the first exception is correctly transformed.

Metadata

Metadata

Assignees

Labels

Package: coreIssues related to the Sentry Core SDK

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions