Package org.hawaiiframework.web.resource
Class ApiErrorResponseResource
java.lang.Object
org.hawaiiframework.web.resource.ErrorResponseResource
org.hawaiiframework.web.resource.ApiErrorResponseResource
Response handler for API errors.
- Since:
- 2.0.0
-
Constructor Summary
ConstructorDescriptionDefault constructor.ApiErrorResponseResource
(ApiException apiException) Constructor with anapiException
. -
Method Summary
Modifier and TypeMethodDescriptionGetter for error code.Getter for reason.void
setApiErrorCode
(String apiErrorCode) Setter for error code.void
setApiErrorReason
(String apiErrorReason) Setter for reason.Methods inherited from class org.hawaiiframework.web.resource.ErrorResponseResource
getContentType, getErrorMessage, getMethod, getQuery, getStatusCode, getStatusMessage, getThrowable, getUri, setContentType, setErrorMessage, setMethod, setQuery, setStatusCode, setStatusMessage, setUri, toString
-
Constructor Details
-
ApiErrorResponseResource
public ApiErrorResponseResource()Default constructor. -
ApiErrorResponseResource
Constructor with anapiException
.
-
-
Method Details
-
getApiErrorCode
Getter for error code.- Returns:
- the error code
-
setApiErrorCode
Setter for error code.- Parameters:
apiErrorCode
- the error code
-
getApiErrorReason
Getter for reason.- Returns:
- the reason
-
setApiErrorReason
Setter for reason.- Parameters:
apiErrorReason
- the reason
-