Files
tubestation/browser/components/asrouter/tests/unit
Dan Mosedale 925a7aee1a Bug 1967339 - Make FxMS expose messages after reach recording failures, r=omc-reviewers,emcminn
If ASRouter._recordReachEvent throws an error, right now we don't handle it, so we don't send exposure, and we don't route the message either. This patch makes that method catch all errors that occur inside it, much like the Glean record method.

The test we include forces an exception by replacing Glean's reach message with a stub that throws, even though it doesn't seem particularly likely that this is what's happening in the field. What's happening in the field seems to happen on the FxMS messaging IDs that are configured incorrectly AND that have some other as-yet-unknown property. There are a couple of live experiments that have (have had) issues but ONLY AFTER A CERTAIN POINT (maybe related to 138 hitting release).

The fix for https://bugzilla.mozilla.org/show_bug.cgi?id=1965869 has repaired the configuration on the recent misconfigured feature ids, which will likely fix many/most problems. This adds another bandaid, where if there's some issue inside _recordReachEvent, we'll handle that too.

More could be done to bulletproof sendTriggerMessage, where the relevant code all lives (we could consider putting the entire thing inside a try/catch block, and ideally even send telemetry if the catch block gets hit). I'm open to thoughts about that...

Differential Revision: https://phabricator.services.mozilla.com/D250302
2025-05-21 21:05:36 +00:00
..