-
Notifications
You must be signed in to change notification settings - Fork 546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent error format #999
Comments
@Wittiest thanks a lot for the detailed report/repro. We'll look into it, I agree we should support the direct access through |
@richardm-stripe it looks like we set the |
As a user of the stripe-ruby gem, I expect to be able to handle errors in a generic way.
The current implementation of the error object creates a world where we cannot be sure of when to use code that accesses
stripe.error
orstripe.message
.Consider the case of exceptions which always have an
error
object:The case of exceptions without an error object:
It would be nice if the SDK handled wrapping errors and exposing methods in a way that allows for us to generically handle and output all of the possible details.
In the current case, there is a subset of fields available on some errors, so it feels like
e.message
and a few others are the only safe access we haveThe text was updated successfully, but these errors were encountered: