Skip to content

Commit

Permalink
fix(analytics): event client flush events to do not discard events fr…
Browse files Browse the repository at this point in the history
…om cache on auth exception (#3999)
  • Loading branch information
NikaHsn authored and khatruong2009 committed Nov 7, 2023
1 parent f100377 commit 3c5c88a
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,11 @@ class EventClient implements Closeable {
// Due to no internet or unable to reach server.
// These exceptions are always retryable.
eventsToDelete.clear();
} on AuthException {
// AuthException indicates request did not complete
// Due to Authentication error.
// These exceptions are always retryable.
eventsToDelete.clear();
} on SmithyHttpException catch (e) {
if (e.statusCode != null && _isRetryable(e.statusCode)) {
eventsToDelete.removeWhere((eventId, _) {
Expand Down

0 comments on commit 3c5c88a

Please sign in to comment.