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.
This commit is contained in:
parent
b0788f7307
commit
b8cf0cc1be
1 changed files with 1 additions and 0 deletions
|
@ -168,6 +168,7 @@ class DonationPaymentRepository(activity: Activity) : StripeApi.PaymentIntentFet
|
|||
}
|
||||
}
|
||||
}.doOnError {
|
||||
SignalStore.donationsValues().clearLevelOperation()
|
||||
LevelUpdate.updateProcessingState(false)
|
||||
}.subscribeOn(Schedulers.io())
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue