Don't wrap donation errors.
This commit is contained in:
parent
3469e8d0e0
commit
950363a4e9
1 changed files with 7 additions and 1 deletions
|
@ -135,7 +135,13 @@ class StripePaymentInProgressViewModel(
|
||||||
.map { (_, paymentMethod) -> paymentMethod ?: secure3DSAction.paymentMethodId!! }
|
.map { (_, paymentMethod) -> paymentMethod ?: secure3DSAction.paymentMethodId!! }
|
||||||
}
|
}
|
||||||
.flatMapCompletable { stripeRepository.setDefaultPaymentMethod(it) }
|
.flatMapCompletable { stripeRepository.setDefaultPaymentMethod(it) }
|
||||||
.onErrorResumeNext { Completable.error(DonationError.getPaymentSetupError(DonationErrorSource.SUBSCRIPTION, it)) }
|
.onErrorResumeNext {
|
||||||
|
if (it is DonationError) {
|
||||||
|
Completable.error(it)
|
||||||
|
} else {
|
||||||
|
Completable.error(DonationError.getPaymentSetupError(DonationErrorSource.SUBSCRIPTION, it))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
disposables += setup.andThen(setLevel).subscribeBy(
|
disposables += setup.andThen(setLevel).subscribeBy(
|
||||||
onError = { throwable ->
|
onError = { throwable ->
|
||||||
|
|
Loading…
Add table
Reference in a new issue