#Matt11-ruby-error

1 messages · Page 1 of 1 (latest)

stoic timber
#

Hey, what's the Q?

tidal sigil
#

but is there a way to understand the possible error for every call?

#

eg: I suppose that Stripe::Customer.create will never return an error like "Stripe::CardError"

stoic timber
#

but is there a way to understand the possible error for every call?
The errors are mostly categorised by type, not so much resource

#

i.e. APIError, InvalidRequestError

tidal sigil
#

yes, is to avoid to rescue for an error that one API will never raise

stoic timber
#

Well theoretically every API could raise most of those errors

tidal sigil
#

ok thank you!

stoic timber
#

For example, you'd get a InvalidRequestError type if you passed an invalid parameter to either /v1/customers or /v1/payment_intents