Class ErrorMessageResponseEnricher
java.lang.Object
org.hawaiiframework.web.exception.ErrorMessageResponseEnricher
- All Implemented Interfaces:
ErrorResponseEnricher
This enricher copies the error message from the exception onto the error response resource.
- Since:
- 2.0.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
doEnrich
(ErrorResponseResource errorResponseResource, Throwable throwable, org.springframework.web.context.request.WebRequest request, org.springframework.http.HttpStatus httpStatus) Performs the enrichment of the error response resource.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hawaiiframework.web.exception.ErrorResponseEnricher
enrich
-
Constructor Details
-
ErrorMessageResponseEnricher
public ErrorMessageResponseEnricher()
-
-
Method Details
-
doEnrich
public void doEnrich(ErrorResponseResource errorResponseResource, Throwable throwable, org.springframework.web.context.request.WebRequest request, org.springframework.http.HttpStatus httpStatus) Performs the enrichment of the error response resource. Note that the http status is a given, it is assumed to be determined in the exception handler.- Specified by:
doEnrich
in interfaceErrorResponseEnricher
- Parameters:
errorResponseResource
- the error response resourcethrowable
- the exception that was raisedrequest
- the original web requesthttpStatus
- the http status that will be returned
-