Skip to content

Commit

Permalink
Don't wrap donation errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-signal committed Nov 17, 2022
1 parent 3469e8d commit 950363a
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -135,7 +135,13 @@ class StripePaymentInProgressViewModel(
.map { (_, paymentMethod) -> paymentMethod ?: secure3DSAction.paymentMethodId!! }
}
.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(
onError = { throwable ->
Expand Down

0 comments on commit 950363a

Please sign in to comment.