public class ErrorResponse extends BaseResponse
Modifier and Type | Method and Description |
---|---|
static ErrorResponse |
alreadyExists(java.lang.String type,
java.lang.String message) |
static ErrorResponse |
alreadyExists(java.lang.String type,
java.lang.String message,
java.lang.Throwable throwable) |
static ErrorResponse |
illegalArguments(java.lang.String message) |
static ErrorResponse |
illegalArguments(java.lang.String message,
java.lang.Throwable throwable) |
static ErrorResponse |
internalError(java.lang.String message) |
static ErrorResponse |
internalError(java.lang.String message,
java.lang.Throwable throwable) |
static ErrorResponse |
nonEmpty(java.lang.String type,
java.lang.String message) |
static ErrorResponse |
nonEmpty(java.lang.String type,
java.lang.String message,
java.lang.Throwable throwable) |
static ErrorResponse |
notFound(java.lang.String type,
java.lang.String message) |
static ErrorResponse |
notFound(java.lang.String type,
java.lang.String message,
java.lang.Throwable throwable) |
static ErrorResponse |
oauthError(int code,
java.lang.String type,
java.lang.String message) |
static ErrorResponse |
restError(java.lang.String message) |
java.lang.String |
toString() |
static ErrorResponse |
unknownError(java.lang.String message) |
void |
validate()
Validates the response code.
|
public void validate()
BaseResponse
validate
in interface RESTMessage
validate
in class BaseResponse
public java.lang.String toString()
toString
in class java.lang.Object
public static ErrorResponse restError(java.lang.String message)
public static ErrorResponse illegalArguments(java.lang.String message)
public static ErrorResponse illegalArguments(java.lang.String message, java.lang.Throwable throwable)
public static ErrorResponse notFound(java.lang.String type, java.lang.String message)
public static ErrorResponse notFound(java.lang.String type, java.lang.String message, java.lang.Throwable throwable)
public static ErrorResponse internalError(java.lang.String message)
public static ErrorResponse internalError(java.lang.String message, java.lang.Throwable throwable)
public static ErrorResponse alreadyExists(java.lang.String type, java.lang.String message)
public static ErrorResponse alreadyExists(java.lang.String type, java.lang.String message, java.lang.Throwable throwable)
public static ErrorResponse nonEmpty(java.lang.String type, java.lang.String message)
public static ErrorResponse nonEmpty(java.lang.String type, java.lang.String message, java.lang.Throwable throwable)
public static ErrorResponse unknownError(java.lang.String message)
public static ErrorResponse oauthError(int code, java.lang.String type, java.lang.String message)