mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 04:58:45 +00:00
Add error handling to re-throw Stripe POST errors.
This commit is contained in:
@@ -135,6 +135,8 @@ class StripeApi(
|
||||
objectMapper.readValue(it.body()!!.string())
|
||||
} catch (e: InvalidDefinitionException) {
|
||||
throw StripeError.FailedToParseSetupIntentResponseError(e)
|
||||
} catch (e: StripeError.PostError) {
|
||||
throw e
|
||||
} catch (e: Exception) {
|
||||
throw StripeError.FailedToParseSetupIntentResponseError(null)
|
||||
}
|
||||
@@ -153,6 +155,8 @@ class StripeApi(
|
||||
objectMapper.readValue(it.body()!!.string())
|
||||
} catch (e: InvalidDefinitionException) {
|
||||
throw StripeError.FailedToParsePaymentIntentResponseError(e)
|
||||
} catch (e: StripeError.PostError) {
|
||||
throw e
|
||||
} catch (e: Exception) {
|
||||
throw StripeError.FailedToParsePaymentIntentResponseError(null)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user