Interface ErrorResponseProcessor<T>

Type Parameters:
T - The response body type
All Known Implementing Classes:
HateoasErrorResponseProcessor

@DefaultImplementation(io.micronaut.http.server.exceptions.response.DefaultErrorResponseProcessor.class) public interface ErrorResponseProcessor<T>
Creates Http responses that represent errors.
Since:
2.4.0
Author:
James Kleeh
  • Method Details

    • processResponse

      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 context
      baseResponse - The base response to retrieve information or mutate
      Returns:
      An error response