You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
@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 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
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
The text was updated successfully, but these errors were encountered: