Class ForbiddenOperationException
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.ForbiddenOperationException
- All Implemented Interfaces:
Serializable
This Represents an HTTP 403 Forbidden response, which generally indicates one of two conditions:
- Authentication was provided, but the authenticated user is not permitted to perform the requested operation.
- The operation is forbidden to all users. Repeating the request with authentication would serve no purpose.
For security failures, you should use
AuthenticationException
if you want to indicate that the
user could not be authenticated (e.g. credential failures), also
known as an authentication failure.
You should use ForbiddenOperationException
if you want to
indicate that the authenticated user does not have permission to
perform the requested operation, also known as an authorization
failure.
Note that a complete list of RESTful exceptions is available in the Package Summary.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionForbiddenOperationException
(String theMessage) ForbiddenOperationException
(String theMessage, IBaseOperationOutcome theOperationOutcome) Constructor -
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 Details
-
STATUS_CODE
- See Also:
-
-
Constructor Details
-
ForbiddenOperationException
-
ForbiddenOperationException
Constructor- Parameters:
theMessage
- The messagetheOperationOutcome
- The OperationOutcome resource to return to the client
-