public class GitLabApiException
extends java.lang.Exception
Constructor and Description |
---|
GitLabApiException(java.lang.Exception e)
Create a GitLabApiException instance based on the exception.
|
GitLabApiException(javax.ws.rs.core.Response response)
Create a GitLabApiException instance based on the ClientResponse.
|
GitLabApiException(java.lang.String message)
Create a GitLabApiException instance with the specified message.
|
GitLabApiException(java.lang.String message,
int httpStatus)
Create a GitLabApiException instance with the specified message and HTTP status code.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> |
getHeaders()
Returns the response headers.
|
int |
getHttpStatus()
Returns the HTTP status code that was the cause of the exception.
|
java.lang.String |
getMessage()
Get the message associated with the exception.
|
java.lang.String |
getReason()
Returns the HTTP status reason message, returns null if the
causing error was not an HTTP related exception.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getValidationErrors()
Returns a Map<String, List<String>> instance containing validation errors if this GitLabApiException
was caused by validation errors on the GitLab server, otherwise returns null.
|
int |
hashCode() |
boolean |
hasValidationErrors()
Returns true if this GitLabApiException was caused by validation errors on the GitLab server,
otherwise returns false.
|
public GitLabApiException(java.lang.String message)
message
- the message for the exceptionpublic GitLabApiException(java.lang.String message, int httpStatus)
message
- the message for the exceptionhttpStatus
- the HTTP status code for the exceptionpublic GitLabApiException(javax.ws.rs.core.Response response)
response
- the JAX-RS response that caused the exceptionpublic GitLabApiException(java.lang.Exception e)
e
- the Exception to wrappublic final java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public final java.lang.String getReason()
public final int getHttpStatus()
public boolean hasValidationErrors()
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getValidationErrors()
public final javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getHeaders()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object