-
-
Notifications
You must be signed in to change notification settings - Fork 357
Closed
Description
Description
Our current solution to avoid duplicated errors being reported to Sentry doesn't work with obfuscated class names as we are checking the exception type against the string JavascriptException.
We have to check this as React Native passes unhandled exceptions from JS layer to the native layers. We catch and send the exception in the JS layer with JS context, the native exception doesn't provide any more useful information.
sentry-react-native/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java
Lines 182 to 192 in 0b40c1b
| // React native internally throws a JavascriptException | |
| // Since we catch it before that, we don't want to send this one | |
| // because we would send it twice | |
| try { | |
| SentryException ex = event.getExceptions().get(0); | |
| if (null != ex && ex.getType().contains("JavascriptException")) { | |
| return null; | |
| } | |
| } catch (Throwable ignored) { | |
| // We do nothing | |
| } |
Metadata
Metadata
Assignees
Labels
No labels
Projects
Status
Done