fix: Capture unexpected TypeError when capturing RouteError (#16327)
fix: Capture unexpected TypeError when capturing RouteError (#16327)

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
beeftornado/sentry,beeftornado/sentry,beeftornado/sentry