Always clear LevelUpdateOperation if an error occurs.

After speaking with the server team, it's been made clear that the
idempotency key should only ever be reutilized if we never heard
back from the server. Since we do not employ an automatic retry
mechanism for setting a user's subscription level (we simply
notify the user of the failure) it is less error-prone to simply
never reuse an idempotency key.
fork-5.53.8
Alex Hart 2021-11-01 09:45:31 -03:00 zatwierdzone przez Greyson Parrelli
rodzic b0788f7307
commit b8cf0cc1be
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -168,6 +168,7 @@ class DonationPaymentRepository(activity: Activity) : StripeApi.PaymentIntentFet
}
}
}.doOnError {
SignalStore.donationsValues().clearLevelOperation()
LevelUpdate.updateProcessingState(false)
}.subscribeOn(Schedulers.io())
}