kopia lustrzana https://github.com/ryukoposting/Signal-Android
Add error handling to re-throw Stripe POST errors.
rodzic
e6f28c6cdd
commit
599caee229
|
@ -135,6 +135,8 @@ class StripeApi(
|
||||||
objectMapper.readValue(it.body()!!.string())
|
objectMapper.readValue(it.body()!!.string())
|
||||||
} catch (e: InvalidDefinitionException) {
|
} catch (e: InvalidDefinitionException) {
|
||||||
throw StripeError.FailedToParseSetupIntentResponseError(e)
|
throw StripeError.FailedToParseSetupIntentResponseError(e)
|
||||||
|
} catch (e: StripeError.PostError) {
|
||||||
|
throw e
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
throw StripeError.FailedToParseSetupIntentResponseError(null)
|
throw StripeError.FailedToParseSetupIntentResponseError(null)
|
||||||
}
|
}
|
||||||
|
@ -153,6 +155,8 @@ class StripeApi(
|
||||||
objectMapper.readValue(it.body()!!.string())
|
objectMapper.readValue(it.body()!!.string())
|
||||||
} catch (e: InvalidDefinitionException) {
|
} catch (e: InvalidDefinitionException) {
|
||||||
throw StripeError.FailedToParsePaymentIntentResponseError(e)
|
throw StripeError.FailedToParsePaymentIntentResponseError(e)
|
||||||
|
} catch (e: StripeError.PostError) {
|
||||||
|
throw e
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
throw StripeError.FailedToParsePaymentIntentResponseError(null)
|
throw StripeError.FailedToParsePaymentIntentResponseError(null)
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue