Skip to content

Commit

Permalink
fix: avoid attempting to flush unhandled error reports in same session
Browse files Browse the repository at this point in the history
  • Loading branch information
fractalwrench committed Jul 13, 2020
1 parent e6d6890 commit 65c5ed7
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,15 @@ void deliver(@NonNull Event event) {
}

if (event.isUnhandled()) {
cacheEvent(event, true);
List<Error> errors = event.getErrors();
String errorClass = null;

if (!errors.isEmpty()) {
Error error = errors.get(0);
errorClass = error.getErrorClass();
}
boolean send = !"ANR".equals(errorClass);
cacheEvent(event, send);
} else {
deliverPayloadAsync(event, eventPayload);
}
Expand Down

0 comments on commit 65c5ed7

Please sign in to comment.