public class GitLabApiException extends Exception
Constructor and Description |
---|
GitLabApiException(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(String message)
Create a GitLabApiException instance with the specified message.
|
Modifier and Type | Method and Description |
---|---|
int |
getHttpStatus()
Returns the HTTP status code that was the cause of the exception.
|
String |
getMessage()
Get the message associated with the exception.
|
String |
getReason()
Returns the HTTP status reason message, returns null if the
causing error was not an HTTP related exception.
|
Map<String,List<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.
|
boolean |
hasValidationErrors()
Returns true if this GitLabApiException was caused by validation errors on the GitLab server,
otherwise returns false.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public GitLabApiException(String message)
message
- the message for the exceptionpublic GitLabApiException(javax.ws.rs.core.Response response)
response
- the JAX-RS response that caused the exceptionpublic GitLabApiException(Exception e)
e
- the Exception to wrappublic final String getMessage()
getMessage
in class Throwable
public final String getReason()
public final int getHttpStatus()
public boolean hasValidationErrors()
public Map<String,List<String>> getValidationErrors()
Copyright © 2018. All rights reserved.