Skip to content

Commit

Permalink
fix: Propagate the crash even on failure (#417)
Browse files Browse the repository at this point in the history
  • Loading branch information
HazAT authored Jun 4, 2018
1 parent 60cf325 commit edceaf6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion android/src/main/java/io/sentry/RNSentryModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ public void startWithDsnString(String dsnString, final ReadableMap options, Prom
sentryClient.addEventSendCallback(new EventSendCallback() {
@Override
public void onFailure(Event event, Exception exception) {

// This needs to be there, otherwise in case of not internet the users app will not
// crash since we do not propagate the error further.
RNSentryEventEmitter.sendEvent(reactContext, RNSentryEventEmitter.SENTRY_EVENT_STORED, new WritableNativeMap());
RNSentryEventEmitter.sendEvent(reactContext, RNSentryEventEmitter.SENTRY_EVENT_SENT_SUCCESSFULLY, new WritableNativeMap());
}

@Override
Expand Down

0 comments on commit edceaf6

Please sign in to comment.