@@ -194,10 +194,6 @@ static void getSentryAndroidOptions(
194
194
return breadcrumb ;
195
195
});
196
196
197
- // React native internally throws a JavascriptException.
198
- // we want to ignore it on the native side to avoid sending it twice.
199
- options .addIgnoredExceptionForType (JavascriptException .class );
200
-
201
197
if (rnOptions .hasKey ("enableNativeCrashHandling" )
202
198
&& !rnOptions .getBoolean ("enableNativeCrashHandling" )) {
203
199
final List <Integration > integrations = options .getIntegrations ();
@@ -224,6 +220,10 @@ static void updateWithReactDefaults(@NotNull SentryAndroidOptions options) {
224
220
options .setTracesSampleRate (null );
225
221
options .setTracesSampler (null );
226
222
options .setEnableTracing (false );
223
+
224
+ // React native internally throws a JavascriptException.
225
+ // we want to ignore it on the native side to avoid sending it twice.
226
+ options .addIgnoredExceptionForType (JavascriptException .class );
227
227
}
228
228
229
229
/**
@@ -234,14 +234,6 @@ static void updateWithReactFinals(@NotNull SentryAndroidOptions options) {
234
234
BeforeSendCallback userBeforeSend = options .getBeforeSend ();
235
235
options .setBeforeSend (
236
236
(event , hint ) -> {
237
- // Unhandled JS Exception are processed by the SDK on JS layer
238
- // To avoid duplicates we drop them in the native SDKs
239
- if (event .getExceptions () != null && !event .getExceptions ().isEmpty ()) {
240
- String exType = event .getExceptions ().get (0 ).getType ();
241
- if (exType != null && exType .contains ("Unhandled JS Exception" )) {
242
- return null ; // Skip sending this event
243
- }
244
- }
245
237
setEventOriginTag (event );
246
238
addPackages (event , options .getSdkVersion ());
247
239
if (userBeforeSend != null ) {
0 commit comments