-
Notifications
You must be signed in to change notification settings - Fork 2
feat: update unhandled promise rejection handling #260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sdk/@launchdarkly/observability-react-native/src/instrumentation/ErrorInstrumentation.ts
Fixed
Show fixed
Hide fixed
sdk/@launchdarkly/observability-react-native/src/instrumentation/ErrorInstrumentation.ts
Fixed
Show fixed
Hide fixed
sdk/@launchdarkly/observability-react-native/src/instrumentation/ErrorInstrumentation.ts
Fixed
Show fixed
Hide fixed
SpennyNDaJets
approved these changes
Oct 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Merged
Vadman97
pushed a commit
that referenced
this pull request
Oct 15, 2025
🤖 I have created a release *beep* *boop* --- <details><summary>observability-react-native: 0.7.0</summary> ## [0.7.0](observability-react-native-0.6.0...observability-react-native-0.7.0) (2025-10-15) ### Features * update unhandled promise rejection handling ([#260](#260)) ([bd0321c](bd0321c)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Release @launchdarkly/observability-react-native 0.7.0 with updated unhandled promise rejection handling and corresponding manifest/version updates. > > - **SDK (@launchdarkly/observability-react-native) — 0.7.0** > - *Feature*: update unhandled promise rejection handling. > - Bump version in `sdk/@launchdarkly/observability-react-native/package.json`. > - Update `.release-please-manifest.json` entry. > - Add `CHANGELOG.md` entry for 0.7.0. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 45e1d87. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Updates our logic for unhandled promise rejections:
HermesInternal.enablePromiseRejectionTrackerhook for setting up a handler.How did you test this change?
Click tested in the RN demo app: https://www.loom.com/share/a6097e43c137463fa9d1c6c6cc94895a
Are there any deployment considerations?
Follow up with Axios customers who have mentioned not seeing errors for failed requests.
JIRA Issue: https://launchdarkly.atlassian.net/browse/O11Y-586
Note
Switches unhandled promise rejection handling to Hermes tracker, adds Axios-aware error extraction, updates the demo app with Axios test actions, and expands tests.
HermesInternal.enablePromiseRejectionTrackerand removes Promise monkey-patching; stops filtering network errors; usesextractRejectionDetailsto enrich attributes (Axios/fetch/primitives/objects).console.error(dropsconsole.warncapture); simplifies attributes.extractRejectionDetails(Axios/fetch/primitives/object parsing); removesisNetworkErrorchecks.ErrorUtilsand Vitestvito RN mock._layout.tsx.axiosto app and SDK dev deps; updatesyarn.lock.Written by Cursor Bugbot for commit 72d8e09. This will update automatically on new commits. Configure here.