Package com.chargebee.v4.exceptions
Class InvalidRequestException
- All Implemented Interfaces:
Serializable
Exception thrown for invalid request errors including validation failures.
This exception is thrown when the API returns an error with type: "invalid_request"
Example usage:
try {
// API call
} catch (InvalidRequestException e) {
System.out.println("Error code: " + e.getApiErrorCodeRaw());
System.out.println("Message: " + e.getMessage());
System.out.println("Params: " + e.getParams());
System.out.println("Request URL: " + e.getRequest().getUrl());
}
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInvalidRequestException(int statusCode, String type, ApiErrorCode apiErrorCode, String message, String jsonResponse, Request request, Response response) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGet the error type value that this exception represents.Methods inherited from class com.chargebee.v4.exceptions.APIException
getApiErrorCode, getApiErrorCodeRaw, getErrorCauseId, getErrorType, getJsonResponse, getParam, getParams, getType, isRetryable, toStringMethods inherited from class com.chargebee.v4.exceptions.HttpException
getResponse, getResponseBody, getStatusCode, isClientError, isServerErrorMethods inherited from class com.chargebee.v4.exceptions.TransportException
getHttpMethod, getRequest, getUrlMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
InvalidRequestException
-
-
Method Details
-
getExpectedErrorType
Get the error type value that this exception represents.- Returns:
- the error type string "invalid_request"
-