Class APIException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.easypost.exception.EasyPostException
com.easypost.exception.APIException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BadRequestError
,EncodingError
,ExternalApiError
,ForbiddenError
,GatewayTimeoutError
,HttpError
,InternalServerError
,InvalidRequestError
,JsonError
,MethodNotAllowedError
,NotFoundError
,PaymentError
,RateLimitError
,RedirectError
,ServiceUnavailableError
,TimeoutError
,UnauthorizedError
,UnknownApiError
- See Also:
-
Constructor Summary
ConstructorDescriptionAPIException
(String message) APIException constructor.APIException
(String message, String code, int statusCode, List<Error> errors) APIException constructor.APIException constructor.APIException
(String message, Throwable ex) APIException constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetCode()
Get code of the error object.Get errors array of the exception.Get message of the error object.Get status code of the error object.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
APIException
APIException constructor.- Parameters:
message
- the exception message
-
APIException
-
APIException
-
APIException
-
-
Method Details
-
getStatusCode
Get status code of the error object.- Returns:
- statusCode the status code of the error object
-
getCode
-
getMessage
Get message of the error object.- Overrides:
getMessage
in classThrowable
- Returns:
- message the message of the error object
-
getErrors
-