#Matt11-ruby-error
1 messages · Page 1 of 1 (latest)
Hi! Here i see the generic error handling https://stripe.com/docs/api/errors/handling?lang=ruby
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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"
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
yes, is to avoid to rescue for an error that one API will never raise
Well theoretically every API could raise most of those errors
ok thank you!
For example, you'd get a InvalidRequestError type if you passed an invalid parameter to either /v1/customers or /v1/payment_intents