Sentry-javascript: Angular/Typescript - some Errors tracked as `Q` Custom Objects

Created on 10 Apr 2019  路  4Comments  路  Source: getsentry/sentry-javascript

Package + Version

  • [x] @sentry/browser
  • [ ] @sentry/node
  • [ ] raven-js
  • [ ] raven-node _(raven for node)_
  • [ ] other:

Version:

5.0.5

Description

We have an Angular 7.0.0 project that errors are being tracked as Q label with CustomObject descriptions. Once we go in, we can see the errors are either ProgressEvent or HttpErrorResponse objects.

Screen Shot 2019-04-10 at 2 10 00 PM

The implementation is exactly as shown in [the browser NPM docs]. just a simple Sentry.init() call(https://docs.sentry.io/workflow/releases/?platform=browsernpm)

Many searches result in links to tutorials or documentation that uses the patterns marked as deprecated here.

Any direction is appreciated!

Most helpful comment

@ewholmes @dottodot the Custom Object label at the bottom means that you are passing object literal to the captureException or throw calls, which is not something we can easily deal with.

That's why we provide Non-Error exception captured with keys: ... message and all the keys are listed in the extras section at the bottom of the issue. This should help you track down where it's done and fix your code to correctly throw an Error object.

All 4 comments

I have a similar issue but it alway shows as captureException rather than Q.
Screenshot 2019-04-23 at 14 36 40

I've set mine up using https://sentry.io/for/angular2/

but this logs some things as
Non-Error exception captured with keys: error, headers, message, name, ok

@ewholmes @dottodot the Custom Object label at the bottom means that you are passing object literal to the captureException or throw calls, which is not something we can easily deal with.

That's why we provide Non-Error exception captured with keys: ... message and all the keys are listed in the extras section at the bottom of the issue. This should help you track down where it's done and fix your code to correctly throw an Error object.

So, I contacted Sentry support and can confirm what it was.

The code is being minified and did not have sourcemaps enabled. Q was the function where the error was happening.

Because Angular has Synthetic Errors, Sentry doesn't recognize them. When this happens, it puts the function name as the Error name within Sentry. You can see the full synthetic error in the Addition Data area, but otherwise you need to handle all of your synthetic errors when they are sent to Sentry if you want different naming.

@ewholmes Thanks for posting to the conclusion.

Was this page helpful?
0 / 5 - 0 ratings