You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dumping my thoughts from the slack conversation here. I don't have time to look at this today but will continue on Monday.
I’ll summarize my preliminary findings from checking out the repro (thanks a lot btw!):
If you call captureException when handling the error, it won’t go through the ErrorHandler but will be sent directly to Sentry. In this case, the error object ends up with the Exception Captured With Keys message that you encountered.
Maybe we can apply the same extraction logic as in the ErrorHandler within the Angular SDK. let me think about this for a bit.
Letting the error bubble up via the ErrorHandler, leads to the error in Sentry.
The “” error type must have been changed recently in the product or during ingest because we add a title property to the event which is “” . The SDK doesn’t set title at all. So some kind of inference logic is going wrong here… I asked ingest the issues team about this
The other problem is that we capture much less information about this error than if we’d directly call captureException on it directly. Most importantly, we loose the stack trace
We could add a stack trace but due to Angular’s ZoneJS usage, it’s pretty worthless because it doesn’t point back to the user source code. Not sure yet if we can solve this but it doesn’t look trivial.
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/angular
SDK Version
8.52.0
Framework Version
19.1.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
https://github.com/cobyeastwood183/angular
error.json
Steps to Reproduce
Expected Result
Expect a HttpException to be captured for HttpErrorResponse.
Actual Result
Instead 'unknown' is captured when caught by the ErrorHandler or 'Object.error' when caught by calling captureException.
The text was updated successfully, but these errors were encountered: