## org.springframework.web
Class HttpMediaTypeNotAcceptableException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              javax.servlet.ServletException
                  org.springframework.web.HttpMediaTypeException
                      org.springframework.web.HttpMediaTypeNotAcceptableException

All Implemented Interfaces:
  Serializable

    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:
  Serialized Form

Constructor Summary
`HttpMediaTypeNotAcceptableException(List<MediaType> supportedMediaTypes)` Create a new HttpMediaTypeNotSupportedException.
`HttpMediaTypeNotAcceptableException(String message)` Create a new HttpMediaTypeNotAcceptableException.

Method Summary

Methods inherited from class org.springframework.web.HttpMediaTypeException
`getSupportedMediaTypes`

Methods inherited from class javax.servlet.ServletException
`getRootCause`

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### HttpMediaTypeNotAcceptableException

    public HttpMediaTypeNotAcceptableException(String message)

  Create a new HttpMediaTypeNotAcceptableException.

  Parameters:
    `message` - the exception message

### HttpMediaTypeNotAcceptableException

    public HttpMediaTypeNotAcceptableException(List<MediaType> supportedMediaTypes)

  Create a new HttpMediaTypeNotSupportedException.

  Parameters:
    `supportedMediaTypes` - the list of supported media types