Interface ErrorResponseProcessor<T>
- Type Parameters:
T
- The response body type
- All Known Implementing Classes:
HateoasErrorResponseProcessor
@DefaultImplementation(HateoasErrorResponseProcessor.class)
public interface ErrorResponseProcessor<T>
Creates Http responses that represent errors.
- Since:
- 2.4.0
- Author:
- James Kleeh
-
Method Summary
Modifier and TypeMethodDescriptionprocessResponse
(@NonNull ErrorContext errorContext, @NonNull MutableHttpResponse<?> baseResponse) Modifies the http response representing the error.
-
Method Details
-
processResponse
@NonNull @NonNull MutableHttpResponse<T> processResponse(@NonNull @NonNull ErrorContext errorContext, @NonNull @NonNull MutableHttpResponse<?> baseResponse) Modifies the http response representing the error. Callers of this method should return the response that was passed in baseResponse parameter, however that isn't required. Error response processors should not set the body or content type if the request method is HEAD.- Parameters:
errorContext
- The error contextbaseResponse
- The base response to retrieve information or mutate- Returns:
- An error response
-