-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(browser): Set more descriptive mechanism.type
in browserApiErrorsIntergation
#17251
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
base: develop
Are you sure you want to change the base?
Conversation
@@ -133,6 +133,7 @@ export function wrap<T extends WrappableFunction, NonFunction>( | |||
return event; | |||
}); | |||
|
|||
// no need to add a mechanism here, we already add it via an event processor above |
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.
wrap
is only called by browserApiErrors
, where I changed type
below.
size-limit report 📦
|
@@ -15,11 +15,8 @@ sentryTest( | |||
type: 'Error', | |||
value: 'xhr_error', | |||
mechanism: { | |||
type: 'instrument', | |||
type: 'auto.browser.browserapierrors.xhr.onreadystatechange', |
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.
Bug: Test Expectation Mismatch with Exception Data
The test expects the exception mechanism to omit the data
field, but the _wrapXHR
implementation still includes data: { handler: getFunctionName(original) }
. The test expectation should be updated to match this, expecting data: { handler: expect.any(String) }
.
type
now follows the trace origin naming scheme. Omitteddata.function
in favour of more specific types.see #17212
closes #17250