
Class UnprocessableEntityException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException
-
- ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException
-
- All Implemented Interfaces:
Serializable
public class UnprocessableEntityException extends BaseServerResponseException
Represents an HTTP 422 Unprocessable Entity response, which means that a resource was rejected by the server because it "violated applicable FHIR profiles or server business rules".This exception will generally contain an
IBaseOperationOutcome
instance which details the failure.
-
-
Field Summary
Fields Modifier and Type Field Description static int
STATUS_CODE
-
Constructor Summary
Constructors Constructor Description UnprocessableEntityException(FhirContext theCtx, IBaseOperationOutcome theOperationOutcome)
Constructor which accepts anIBaseOperationOutcome
resource which will be supplied in the responseUnprocessableEntityException(String theMessage)
Constructor which accepts a String describing the issue.UnprocessableEntityException(String... theMessage)
Constructor which accepts an array of Strings describing the issue.UnprocessableEntityException(String theMessage, Throwable theCause)
Constructor which accepts a String describing the issue.UnprocessableEntityException(String theMessage, IBaseOperationOutcome theOperationOutcome)
ConstructorUnprocessableEntityException(IBaseOperationOutcome theOperationOutcome)
Deprecated.Use constructor with FhirContext argument
-
Method Summary
-
Methods inherited from class ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException
addResponseHeader, getAdditionalMessages, getOperationOutcome, getResponseBody, getResponseHeaders, getResponseMimeType, getStatusCode, hasResponseHeaders, isErrorMessageTrusted, newInstance, setErrorMessageTrusted, setOperationOutcome, setResponseBody, setResponseMimeType
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
STATUS_CODE
public static final int STATUS_CODE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UnprocessableEntityException
public UnprocessableEntityException(String theMessage, IBaseOperationOutcome theOperationOutcome)
Constructor- Parameters:
theMessage
- The message to add to the status linetheOperationOutcome
- TheIBaseOperationOutcome
resource to return to the client
-
UnprocessableEntityException
@Deprecated public UnprocessableEntityException(IBaseOperationOutcome theOperationOutcome)
Deprecated.Use constructor with FhirContext argumentConstructor which accepts anIBaseOperationOutcome
resource which will be supplied in the response
-
UnprocessableEntityException
public UnprocessableEntityException(FhirContext theCtx, IBaseOperationOutcome theOperationOutcome)
Constructor which accepts anIBaseOperationOutcome
resource which will be supplied in the response
-
UnprocessableEntityException
public UnprocessableEntityException(String theMessage)
Constructor which accepts a String describing the issue. This string will be translated into anIBaseOperationOutcome
resource which will be supplied in the response.
-
UnprocessableEntityException
public UnprocessableEntityException(String theMessage, Throwable theCause)
Constructor which accepts a String describing the issue. This string will be translated into anIBaseOperationOutcome
resource which will be supplied in the response.
-
UnprocessableEntityException
public UnprocessableEntityException(String... theMessage)
Constructor which accepts an array of Strings describing the issue. This strings will be translated into anIBaseOperationOutcome
resource which will be supplied in the response.
-
-