public class ApiErrorResponseEnricher extends Object implements ErrorResponseEnricher
ApiException
.Constructor and Description |
---|
ApiErrorResponseEnricher() |
Modifier and Type | Method and Description |
---|---|
void |
doEnrich(ErrorResponseResource errorResponseResource,
Throwable throwable,
WebRequest request,
HttpStatus httpStatus)
Performs the enrichment of the error response resource.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
enrich
public void doEnrich(ErrorResponseResource errorResponseResource, Throwable throwable, WebRequest request, HttpStatus httpStatus)
NOTE: This enricher only applies if throwable is an ApiException
and
#errorResponseResource is an ApiErrorResponseResource
.
doEnrich
in interface ErrorResponseEnricher
errorResponseResource
- the error response resourcethrowable
- the exception that was raisedrequest
- the original web requesthttpStatus
- the http status that will be returned