Files
worldmonitor/tests
Elie Habib 7e68b30eb8 chore(sentry): filter PlayerControlsInterface + extension-wrapped fetch noise (#3400)
* chore(sentry): filter PlayerControlsInterface + extension-wrapped fetch noise

Triaged unresolved Sentry issues — added two targeted noise filters:

- WORLDMONITOR-P2: ignoreErrors entry for /PlayerControlsInterface\.\w+ is
  not a function/ (Android Chrome WebView native bridge injection, like
  the existing _pcmBridgeCallbackHandler / hybridExecute patterns).
- WORLDMONITOR-P5: beforeSend guard suppressing TypeError 'Failed to fetch
  (<host>)' when any frame is a browser-extension URL. Some AdBlock-class
  extensions wrap window.fetch and their replacement can fail for reasons
  unrelated to our backend; the existing maplibre host-allowlist doesn't
  cover our own hosts (abacus.worldmonitor.app, api.worldmonitor.app), and
  gating on the extension frame keeps signal for genuine first-party
  fetch failures from users without such extensions.

P1 (Dodo declined) and P4 (FRED 520) are intentional ops captures — left
unfiltered and resolved in next release. P3 (dyn-import) follows the
established policy that first-party stack frames must surface and is
mitigated by installChunkReloadGuard; resolved without a filter.

* fix(sentry): gate P5 extension-fetch filter on !hasFirstParty + add regression tests

Per PR review: the new `Failed to fetch (<host>)` extension-frame filter
needs the same `!hasFirstParty` gate the broader extension rule already
uses. Without it, a real first-party regression like a panels-*.js fetch
to api.worldmonitor.app would be silenced for users who happen to run
fetch-wrapping extensions.

Added two regression tests that lock in the safety property: extension-
only stacks suppress (the original P5 case); first-party + extension
mixed stacks reach Sentry (api.worldmonitor.app outage scenario).

* refactor(sentry): drop redundant P5 filter, retain regression tests for existing extension rule
2026-04-25 16:43:17 +04:00
..