Skip to content

Capturing RouteError fails unexpectedly #16314

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

Closed
jeffkwoh opened this issue Jan 8, 2020 · 0 comments · Fixed by #16327
Closed

Capturing RouteError fails unexpectedly #16314

jeffkwoh opened this issue Jan 8, 2020 · 0 comments · Fixed by #16327

Comments

@jeffkwoh
Copy link
Contributor

jeffkwoh commented Jan 8, 2020

Sometimes when capturing a RouteError, writing to the message property of JavaScript's Error object causes a Type Error: setting getter-only property "message".

The new Type Error exception thrown is then logged into Sentry, causing the previous RouteError to be discarded.

While instances are captured in Sentry, these errors are not reproducible. The message property should be writable, it is unclear why these errors are being thrown in this scenario. @billyvg suspects browser or browser extension incompatibility.

@jeffkwoh jeffkwoh self-assigned this Jan 8, 2020
jeffkwoh pushed a commit to jeffkwoh/sentry that referenced this issue Jan 8, 2020
Wraps unreproducible Type Error (missing setter) in Error.message property in a try-catch. Type
Error is unreproducible, and when thrown causes intital error to be ignored and the newer and less
informative Type Error to be captured by Sentry instead. Currently, a minority of users are
affected and certain browser and/or browser extension incompatibility is suspected.

Suppression should help in the discovery of the actual errors causing the RouteError and perhaps
uncover the root cause of the Type Error.

Fixes getsentryGH-16314
Fixes Sentry-JAVASCRIPT-129Q
jeffkwoh added a commit that referenced this issue Jan 9, 2020
fix: Capture unexpected Type Error in capturing RouteError

Wraps unreproducible TypeError (missing setter) in Error.message property in a try-catch. When the TypeError is thrown it causes the initial RouteError to be ignored and the newer and less
informative TypeError to be captured by Sentry instead. Currently, a minority of users are
affected and certain browser and/or browser extension incompatibility is suspected.

By capturing the new TypeError, and returning to the RouteError context, we are then able to capture the emitted RouteError. This should help in the discovery of the actual errors causing the RouteError and perhaps uncover the root cause of the TypeError.

Fixes GH-16314
Fixes Sentry-JAVASCRIPT-129Q
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant