public class ErrorResponse extends BaseResponse
| Modifier and Type | Method and Description | 
|---|---|
static ErrorResponse | 
alreadyExists(java.lang.String type,
             java.lang.String message)
Create a new already exists error instance of  
ErrorResponse. | 
static ErrorResponse | 
alreadyExists(java.lang.String type,
             java.lang.String message,
             java.lang.Throwable throwable)
Create a new already exists error instance of  
ErrorResponse. | 
static ErrorResponse | 
connectionFailed(java.lang.String message)
Create a new connection failed error instance of  
ErrorResponse. | 
static ErrorResponse | 
connectionFailed(java.lang.String message,
                java.lang.Throwable throwable)
Create a new connection failed error instance of  
ErrorResponse. | 
static ErrorResponse | 
illegalArguments(java.lang.String message)
Create a new illegal arguments error instance of  
ErrorResponse. | 
static ErrorResponse | 
illegalArguments(java.lang.String type,
                java.lang.String message,
                java.lang.Throwable throwable)
Create a new illegal arguments error instance of  
ErrorResponse. | 
static ErrorResponse | 
illegalArguments(java.lang.String message,
                java.lang.Throwable throwable)
Create a new illegal arguments error instance of  
ErrorResponse. | 
static ErrorResponse | 
internalError(java.lang.String message)
Create a new internal error instance of  
ErrorResponse. | 
static ErrorResponse | 
internalError(java.lang.String message,
             java.lang.Throwable throwable)
Create a new internal error instance of  
ErrorResponse. | 
static ErrorResponse | 
nonEmpty(java.lang.String type,
        java.lang.String message)
Create a new non-empty error instance of  
ErrorResponse. | 
static ErrorResponse | 
nonEmpty(java.lang.String type,
        java.lang.String message,
        java.lang.Throwable throwable)
Create a new non-empty error instance of  
ErrorResponse. | 
static ErrorResponse | 
notFound(java.lang.String type,
        java.lang.String message)
Create a new not found error instance of  
ErrorResponse. | 
static ErrorResponse | 
notFound(java.lang.String type,
        java.lang.String message,
        java.lang.Throwable throwable)
Create a new not found error instance of  
ErrorResponse. | 
static ErrorResponse | 
oauthError(int code,
          java.lang.String type,
          java.lang.String message)
Create a new unknown error instance of  
ErrorResponse. | 
static ErrorResponse | 
restError(java.lang.String message)
Creates a new rest error instance of  
ErrorResponse. | 
java.lang.String | 
toString()  | 
static ErrorResponse | 
unknownError(java.lang.String message)
Create a new unknown error instance of  
ErrorResponse. | 
static ErrorResponse | 
unsupportedOperation(java.lang.String message)
Create a new unsupported operation error instance of  
ErrorResponse. | 
static ErrorResponse | 
unsupportedOperation(java.lang.String message,
                    java.lang.Throwable throwable)
Create a new unsupported operation error instance of  
ErrorResponse. | 
void | 
validate()
Validates the error response. 
 | 
public void validate()
validate in interface RESTMessagevalidate in class BaseResponsepublic java.lang.String toString()
toString in class java.lang.Objectpublic static ErrorResponse restError(java.lang.String message)
ErrorResponse.message - The message of the error.public static ErrorResponse illegalArguments(java.lang.String message)
ErrorResponse.message - The message of the error.public static ErrorResponse illegalArguments(java.lang.String message, java.lang.Throwable throwable)
ErrorResponse.message - The message of the error.throwable - The throwable that caused the error.public static ErrorResponse illegalArguments(java.lang.String type, java.lang.String message, java.lang.Throwable throwable)
ErrorResponse.type - The type of the error.message - The message of the error.throwable - The throwable that caused the error.public static ErrorResponse connectionFailed(java.lang.String message)
ErrorResponse.message - The message of the error.public static ErrorResponse connectionFailed(java.lang.String message, java.lang.Throwable throwable)
ErrorResponse.message - The message of the error.throwable - The throwable that caused the error.public static ErrorResponse notFound(java.lang.String type, java.lang.String message)
ErrorResponse.type - The type of the error.message - The message of the error.public static ErrorResponse notFound(java.lang.String type, java.lang.String message, java.lang.Throwable throwable)
ErrorResponse.type - The type of the error.message - The message of the error.throwable - The throwable that caused the error.public static ErrorResponse internalError(java.lang.String message)
ErrorResponse.message - The message of the error.public static ErrorResponse internalError(java.lang.String message, java.lang.Throwable throwable)
ErrorResponse.message - The message of the error.throwable - The throwable that caused the error.public static ErrorResponse alreadyExists(java.lang.String type, java.lang.String message)
ErrorResponse.type - The type of the error.message - The message of the error.public static ErrorResponse alreadyExists(java.lang.String type, java.lang.String message, java.lang.Throwable throwable)
ErrorResponse.type - The type of the error.message - The message of the error.throwable - The throwable that caused the error.public static ErrorResponse nonEmpty(java.lang.String type, java.lang.String message)
ErrorResponse.type - The type of the error.message - The message of the error.public static ErrorResponse nonEmpty(java.lang.String type, java.lang.String message, java.lang.Throwable throwable)
ErrorResponse.type - The type of the error.message - The message of the error.throwable - The throwable that caused the error.public static ErrorResponse unknownError(java.lang.String message)
ErrorResponse.message - The message of the error.public static ErrorResponse oauthError(int code, java.lang.String type, java.lang.String message)
ErrorResponse.code - The code of the error.type - The type of the error.message - The message of the error.public static ErrorResponse unsupportedOperation(java.lang.String message)
ErrorResponse.message - The message of the error.public static ErrorResponse unsupportedOperation(java.lang.String message, java.lang.Throwable throwable)
ErrorResponse.message - The message of the error.throwable - The throwable that caused the error.