Package org.apache.juneau.http.response
Class UnprocessableEntity
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.juneau.http.response.BasicHttpException
org.apache.juneau.http.response.UnprocessableEntity
- All Implemented Interfaces:
Serializable,HttpResponseMessage
- Direct Known Subclasses:
UnprocessableEntity.Unmodifiable
Represents an HTTP 422 Unprocessable Entity error response.
The request was well-formed but was unable to be followed due to semantic errors.
See Also:
- Since:
- 9.2.1
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUnmodifiable point-in-time snapshot of the enclosingUnprocessableEntityexception. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringReason phrasestatic final intHTTP status code -
Constructor Summary
ConstructorsConstructorDescriptionConstructor with no message.UnprocessableEntity(String msg, Object... args) Constructor with aString.format-style message.UnprocessableEntity(Throwable cause) Constructor with a cause.UnprocessableEntity(Throwable cause, String msg, Object... args) Constructor with a cause and aString.format-style message.UnprocessableEntity(UnprocessableEntity copyFrom) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns an unmodifiable snapshot of this bean.Methods inherited from class org.apache.juneau.http.response.BasicHttpException
addHeader, addHeader, equals, freeze, getBody, getFullStackMessage, getHeaders, getLocale, getMessage, getRootCause, getStatusCode, getStatusLine, hashCode, isUnmodifiable, modify, setBody, setContent, setContent, setHeader, setHeader, setHeaders, setHeaders, setLocale, setProtocolVersion, setReasonPhrase, setStatusCode, setStatusLine, toStringMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTraceMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.juneau.http.response.HttpResponseMessage
getFirstHeader, getHeaders
-
Field Details
-
STATUS_CODE
HTTP status code- See Also:
-
REASON_PHRASE
Reason phrase- See Also:
-
-
Constructor Details
-
UnprocessableEntity
public UnprocessableEntity()Constructor with no message. -
UnprocessableEntity
Constructor with aString.format-style message.- Parameters:
msg- The detail message. May benull . Treated as aString.format-style format string (%s placeholders) whenargsis non-empty.args- Optional message arguments.
-
UnprocessableEntity
Constructor with a cause.- Parameters:
cause- The cause. May benull .
-
UnprocessableEntity
Constructor with a cause and aString.format-style message.- Parameters:
cause- The cause. May benull .msg- The detail message. May benull . Treated as aString.format-style format string (%s placeholders) whenargsis non-empty.args- Optional message arguments.
-
UnprocessableEntity
Copy constructor.- Parameters:
copyFrom- The instance to copy. Must not benull .
-
-
Method Details
-
unmodifiable
Description copied from class:BasicHttpExceptionReturns an unmodifiable snapshot of this bean.The returned instance is a point-in-time copy of the leaf's nested
Unmodifiabletype; any attempt to set a property on it throws anUnsupportedOperationException. This method is idempotent: if this bean is already unmodifiable it returns itself rather than taking another snapshot. The receiver is left unchanged (and still modifiable unless it was already unmodifiable).- Overrides:
unmodifiablein classBasicHttpException- Returns:
- An unmodifiable snapshot of this bean, or this bean if it is already unmodifiable.
-