Skip to content

fix: only report window errors thrown by processout.js - #282

Merged
roshan-gorasia-cko merged 1 commit into
masterfrom
fix/telemetry-own-script-errors
Oct 19, 2026
Merged

roshan-gorasia-cko merged 1 commit into
masterfrom
fix/telemetry-own-script-errors

Conversation

@roshan-gorasia-cko

@roshan-gorasia-cko roshan-gorasia-cko commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

The global error handler reported any error whose file was on a ProcessOut host. Some browsers, such as Chrome on iOS, attribute errors from their own injected scripts to the page URL, so errors that aren't ours were being reported.

Solution

  • Only report errors thrown by the processout.js script itself (isProcessOutScriptError in telemetry.ts).
  • Skip error events with no error object, which the handler previously dereferenced.
  • Version bumped to 1.9.16.

Checklist

  • I bumped the version of the project using yarn bump-version
  • I have checked the code for any potential issues
  • I tested my changes in the browser

Notes

Unit tests cover the filter in test/processout/telemetry.test.ts.

🤖 Generated with Claude Code

@roshan-gorasia-cko
roshan-gorasia-cko requested review from jakubjasinsky and a balanced review from Copilot October 19, 2026 13:15
@roshan-gorasia-cko
roshan-gorasia-cko marked this pull request as ready for review October 19, 2026 13:15
The global error handler reported any error whose file was on a
ProcessOut host. Some browsers attribute errors from their injected
scripts to the page URL, so errors that aren't ours were reported.
Restrict reporting to the processout.js script and skip events with no
error object.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@roshan-gorasia-cko
roshan-gorasia-cko force-pushed the fix/telemetry-own-script-errors branch from 68e240d to 33d1b71 Compare October 19, 2026 13:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused changes address the reported telemetry noise with targeted tests and no identified blocking issues.

No open issues 🎉

What changed in this PR

Restricts global error telemetry to processout.js errors on ProcessOut hosts, excluding browser-injected errors attributed to hosted payment pages.

Changes:

  • Adds a script URL filter that skips events without an error object.
  • Adds targeted filter tests and a telemetry test loader.
  • Bumps the version to 1.9.16.
File Description
test/​support/​loadNamespace.ts Adds a telemetry namespace loader for tests.
test/​processout/​telemetry.test.ts Tests accepted URLs and rejected error events.
src/​processout/​telemetry.ts Defines the script error filter.
src/​processout/​processout.ts Applies the filter to global error reporting.
package.json Bumps the version to 1.9.16.

Review effort: Balanced

@roshan-gorasia-cko
roshan-gorasia-cko merged commit 40bcd5f into master Oct 19, 2026
5 checks passed
@roshan-gorasia-cko
roshan-gorasia-cko deleted the fix/telemetry-own-script-errors branch October 19, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants