-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Improve Error Casting #1014
Conversation
Asset Size Report
Merging this pull request will result in the following asset size changes:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1014 +/- ##
==========================================
+ Coverage 86.64% 87.06% +0.42%
==========================================
Files 154 155 +1
Lines 7126 7122 -4
Branches 1414 1434 +20
==========================================
+ Hits 6174 6201 +27
+ Misses 829 806 -23
+ Partials 123 115 -8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I just have the one question about how our decoration of the error object could clash with multiple agents running on the same page.
Improve detection of line and column to allow errors that throw without a stack -- such as some chrome errors -- to still get basic error location information
Overview
The primary goal of this PR was to address an issue where certain browsers (Chrome) can emit errors without a stack property under certain circumstances. These errors are emitted with a line and column, but the previous implementation of the agent blindly ignored that data if the error was an instance of the Error class. This PR:
solely
on the errorEvent, these errors can actually throwafter
the SPA interaction has already closed. The agent will decorate the errors directly in the SPA feature now, so that by the time they are seen in the error feature, they already have interaction information tied to them.Related Issue(s)
NR-262956
Testing
New unit & wdio tests have been added