Class InvalidRequestException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.sourcelab.kafka.connect.apiclient.rest.exceptions.InvalidRequestException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ConcurrentConfigModificationException,ConnectionException,ResourceNotFoundException,ResultParsingException,UnauthorizedRequestException
Represents when a request is invalid.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInvalidRequestException(String message, int errorCode) Constructor.InvalidRequestException(String message, Throwable cause) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic InvalidRequestExceptionfactory(RequestErrorResponse errorResponse) Factory method to create proper exception class based on the error.intResulting HTTP Status code.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidRequestException
Constructor.- Parameters:
message- Error message.errorCode- Http Error Code.
-
InvalidRequestException
Constructor.- Parameters:
message- Error message.cause- Originating exception.
-
-
Method Details
-
getErrorCode
public int getErrorCode()Resulting HTTP Status code.- Returns:
- Http Status Code.
-
factory
Factory method to create proper exception class based on the error.- Parameters:
errorResponse- Parsed error response from server.- Returns:
- Appropriate Exception class.
-