public interface ErrorResponseEnricher
HawaiiResponseEntityExceptionHandler has a list of ErrorResponseEnrichers, which will make sure that
all relevant information is captured in the error response.| Modifier and Type | Method and Description |
|---|---|
void |
doEnrich(ErrorResponseResource errorResponseResource,
java.lang.Throwable throwable,
org.springframework.web.context.request.WebRequest request,
org.springframework.http.HttpStatus httpStatus)
Performs the enrichment of the error response resource.
|
default void |
enrich(ErrorResponseResource errorResponseResource,
org.springframework.web.context.request.WebRequest request,
org.springframework.http.HttpStatus httpStatus)
Default implementation that first retrieves the original throwable stored in the error response resource, and
then calls
doEnrich(ErrorResponseResource, Throwable, WebRequest, HttpStatus). |
default void enrich(ErrorResponseResource errorResponseResource, org.springframework.web.context.request.WebRequest request, org.springframework.http.HttpStatus httpStatus)
doEnrich(ErrorResponseResource, Throwable, WebRequest, HttpStatus).
Note that the http status is a given, it is assumed to be determined in the exception handler.errorResponseResource - the error response resourcerequest - the original web requesthttpStatus - the http status that will be returnedvoid doEnrich(ErrorResponseResource errorResponseResource, java.lang.Throwable throwable, org.springframework.web.context.request.WebRequest request, org.springframework.http.HttpStatus httpStatus)
errorResponseResource - the error response resourcethrowable - the exception that was raisedrequest - the original web requesthttpStatus - the http status that will be returned