public class ValidationErrorResponseEnricher extends java.lang.Object implements ErrorResponseEnricher
Constructor and Description |
---|
ValidationErrorResponseEnricher(ValidationErrorResourceAssembler validationErrorResourceAssembler) |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
enrich
public ValidationErrorResponseEnricher(ValidationErrorResourceAssembler validationErrorResourceAssembler)
public void doEnrich(ErrorResponseResource errorResponseResource, java.lang.Throwable throwable, org.springframework.web.context.request.WebRequest request, org.springframework.http.HttpStatus httpStatus)
NOTE: This enricher only applies if throwable is a ValidationException
and
#errorResponseResource is a ValidationErrorResponseResource
.
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