Class HttpMediaTypeNotAcceptableException

All Implemented Interfaces:
Serializable, ErrorResponse

public class HttpMediaTypeNotAcceptableException extends HttpMediaTypeException
Exception thrown when the request handler cannot generate a response that is acceptable by the client.
Since:
3.0
Author:
Arjen Poutsma
See Also:
  • Constructor Details

    • HttpMediaTypeNotAcceptableException

      public HttpMediaTypeNotAcceptableException(String message)
      Constructor for when the Accept header cannot be parsed.
      Parameters:
      message - the parse error message
    • HttpMediaTypeNotAcceptableException

      public HttpMediaTypeNotAcceptableException(List<MediaType> mediaTypes)
      Create a new HttpMediaTypeNotSupportedException.
      Parameters:
      mediaTypes - the list of supported media types
  • Method Details

    • getStatusCode

      public HttpStatusCode getStatusCode()
      Description copied from interface: ErrorResponse
      Return the HTTP status code to use for the response.
    • getHeaders

      public HttpHeaders getHeaders()
      Description copied from interface: ErrorResponse
      Return headers to use for the response.