Package com.stripe.exception
Class StripeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.stripe.exception.StripeException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ApiConnectionException
,ApiException
,AuthenticationException
,CardException
,EventDataObjectDeserializationException
,IdempotencyException
,InvalidRequestException
,OAuthException
,SignatureVerificationException
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCode()
Returns the error code of the response that triggered this exception.Returns a description of the exception, including the HTTP status code and request ID (if applicable).Returns the request ID of the request that triggered this exception.Returns the status code of the response that triggered this exception.The error resource returned by Stripe's API that caused the exception.Returns a description of the user facing exceptionvoid
setStripeError
(StripeError stripeError) The error resource returned by Stripe's API that caused the exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
Method Details
-
getMessage
Returns a description of the exception, including the HTTP status code and request ID (if applicable).- Overrides:
getMessage
in classThrowable
- Returns:
- a string representation of the exception.
-
getUserMessage
Returns a description of the user facing exception- Returns:
- a string representation of the user facing exception.
-
getStripeError
The error resource returned by Stripe's API that caused the exception. -
getCode
Returns the error code of the response that triggered this exception. ForApiException
the error code will be equal toStripeError.getCode()
.- Returns:
- the string representation of the error code.
-
getRequestId
Returns the request ID of the request that triggered this exception.- Returns:
- the request ID.
-
getStatusCode
Returns the status code of the response that triggered this exception.- Returns:
- the status code.
-
setStripeError
The error resource returned by Stripe's API that caused the exception.
-