public final class UnprocessableEntityException extends LocalizedException
This exception will always report an HTTP error status 422.
If the response uses JSON format, content will have the following form:
{ "errorCode": 999, // The error code. "localizedMessage":"HTTP error 422.", // A localized message that may be displayed to end users. "messages":["HTTP 422 Unprocessable Entity"] // Additional messages especially useful when debugging (optional) // Usually not displayed to end users and not localized. }
Modifier and Type | Field and Description |
---|---|
static int |
HTTP_SC_UNPROCESSABLE_ENTITY
HTTP status code for Unprocessable Entity Error.
|
Constructor and Description |
---|
UnprocessableEntityException()
Creates an unprocessable entity exception without message.
|
UnprocessableEntityException(String aUserMessage)
Creates an unprocessable entity exception.
|
UnprocessableEntityException(String aUserMessage,
Integer anErrorCode)
Creates an unprocessable entity exception.
|
UnprocessableEntityException(UserMessage aUserMessage)
Creates an unprocessable entity exception.
|
UnprocessableEntityException(UserMessage aUserMessage,
Integer anErrorCode)
Creates an unprocessable entity exception.
|
getErrorCode, getStatus, getUserMessage
getResponse
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static final int HTTP_SC_UNPROCESSABLE_ENTITY
This status code is mainly used to report functional errors.
public UnprocessableEntityException()
public UnprocessableEntityException(String aUserMessage)
public UnprocessableEntityException(UserMessage aUserMessage)
public UnprocessableEntityException(String aUserMessage, Integer anErrorCode)
The provided user message, seen as String,
will be transformed into a UserMessage
object.
public UnprocessableEntityException(UserMessage aUserMessage, Integer anErrorCode)
aUserMessage
- the localized message that may be displayed to the end user.anErrorCode
- the functional error code.
This code is defined by the REST service and may be null
.