Skip to content

"Non-Error exception captured with keys: [...]" due to invalid error instanceof check #6822

Description

@theofidry

This issue is a follow up of #6332. It has been close since at that time I thought this was an Angular package only issue, but it looks like the is also upstream.

From what I can see, this is caused by https://github.com/getsentry/sentry-javascript/blob/master/packages/browser/src/eventbuilder.ts#L228-L230.

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which package are you using?

@sentry/angular

SDK Version

7.4.30

Framework Version

Angular 13.3 & Ionic 5

Link to Sentry event

No response

SDK Setup

No response

Steps to Reproduce

throw {
  name: 'ErrorLikeObject',
  message: 'ErrorLikeObject message',
};

Expected Result

A Sentry record showing something along the lines of:

ErrorLikeObject
ErrorLikeObject message

Actual Result

The current Sentry record showing something along the lines of:

captureException
Non-Error exception captured with keys: message, name

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions