feature: contain sdk failures instead of crashing the host app - #396
Merged
Merged
Conversation
melekr
approved these changes
Sep 23, 2026
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
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
A failure inside the SDK no longer crashes or changes the host app, the SDK turns that feature off and logs a
Backtracewarning.Changes
failureLog.ts: new, one-lineBacktrace:warning with the error class, never the error message.index.ts: exportsfailureLog.AttributeManager.ts: skips a provider that throws.BreadcrumbsManager.ts:addBreadcrumbnever throws, re-entry guard for interceptors that log.BacktraceCoreClient.ts:send()never throws or rejects.BacktraceDatabase.ts,BacktraceMetrics.ts: warn instead of leaving an unhandled rejection.BacktraceClient.ts:initialize()never throws, falls back to a disabled client, defaults missing app attributes tounknown, guards each init and dispose step,dispose()clears the singleton.BacktraceClientBuilder.ts: runs JS-only without the native storage modules.CrashReporter.ts: warns on every path that turns native crash reporting off.UnhandledExceptionHandler.ts: the app's global handler always runs.AnrWatchdogHandler.ts: guards the ANR listener and native calls.WebRequestEventSubscriber.ts: keeps synchronous XHR synchronous.ErrorBoundary.tsx: warns instead of throwing without a client.BacktraceReactNative.java: survives a missing native library, converts attribute values to strings.BacktraceDirectoryProvider.java: lists a missing directory as empty.BacktraceFileSystemProvider.java: guardsunlinkandexists.StreamWriter.java: thread-safe writer map.AnrWatchdog.java,BacktraceAnrWatchdog.java: an exception in the watchdog no longer kills the app.OomWatcher.mm,BacktraceCrashReporter.mm: nil-safe.BacktraceReactNative.mm: catches native init and update exceptions.failureContainmentTests.spec.ts,selfHealingTests.spec.ts: new.ref: BT-7704