Skip to content

prevent traces from breaking mobile app#8586

Merged
bergarces merged 5 commits intomainfrom
prevent-traces-from-breaking
Apr 27, 2026
Merged

prevent traces from breaking mobile app#8586
bergarces merged 5 commits intomainfrom
prevent-traces-from-breaking

Conversation

@bergarces
Copy link
Copy Markdown
Contributor

@bergarces bergarces commented Apr 27, 2026

Explanation

When calling trace returns undefined, trying to catch the promise will break the app. This prevents it.

Mobile returns undefined in that callback.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Low risk: a small defensive change in telemetry code to tolerate TraceCallback implementations that return undefined, preventing runtime crashes without affecting asset fetching logic.

Overview
Prevents AssetsController telemetry from breaking the app by making #emitTrace tolerate trace implementations that return undefined (only calling .catch() when a promise is returned).

Updates the assets-controller changelog with a Fixed entry documenting the trace callback handling change.

Reviewed by Cursor Bugbot for commit ee070e4. Bugbot is set up for automated code reviews on this repo. Configure here.

@bergarces bergarces force-pushed the prevent-traces-from-breaking branch from 4d22643 to 9c517d4 Compare April 27, 2026 10:03
@bergarces bergarces marked this pull request as ready for review April 27, 2026 10:11
@bergarces bergarces requested review from a team as code owners April 27, 2026 10:11
@bergarces bergarces changed the title prevent traces from breaking prevent traces from breaking mobile app Apr 27, 2026
@bergarces bergarces force-pushed the prevent-traces-from-breaking branch from aae5cf8 to ee070e4 Compare April 27, 2026 11:54
@bergarces bergarces enabled auto-merge April 27, 2026 11:58
@bergarces bergarces added this pull request to the merge queue Apr 27, 2026
Merged via the queue into main with commit 2fb50ce Apr 27, 2026
358 checks passed
@bergarces bergarces deleted the prevent-traces-from-breaking branch April 27, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants