Skip to content
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

Request: Stripe InvalidRequestException should provide an error code #189

Closed
alexg313 opened this issue Jul 5, 2015 · 3 comments
Closed

Comments

@alexg313
Copy link

alexg313 commented Jul 5, 2015

Currently when an InvalidRequestException (IRE) is thrown, no error code is provided. This forces the client to parse a string to determine what exactly the error is. Could the library add error codes where it makes sense?

Example: When calling "charge.capture()" on an already captured charge, here's what is returned as part of the IRE. A code (i.e. CHARGE_ALREADY_CAPTURED) would be great.

e.getParam(): null
e.getLocalizedMessage(): Charge ch_16L0j8A1uVHZiLuVb8Say0YW has already been captured.
e.getMessage(): Charge ch_16L0j8A1uVHZiLuVb8Say0YW has already been captured.
e.getCause(): null

@kyleconroy
Copy link
Contributor

@alexg313 Thanks for the feature request. Since this isn't provided by the API, we can't provide a code through stripe-java. However, we have thought of adding more error codes to detect errors like this. I can't provide a timeline, but we know this is a problem.

@mcbethio
Copy link

We are experiencing the same issue. Is it possible to re-open this ticket?

It looks like the android library has it > stripe/stripe-android#614

@remi-stripe
Copy link
Contributor

@mcbethio this is a 9 years old issue and it's unlikely to be related to your ask. The stripe-java SDK and the Android SDK are completely separate. I would recommend reaching out to our support team for 1:1 integration support help instead: https://support.stripe.com/contact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants