Class HttpMediaTypeNotSupportedException

All Implemented Interfaces:
Serializable

public class HttpMediaTypeNotSupportedException extends HttpMediaTypeException
Exception thrown when a client POSTs, PUTs, or PATCHes content of a type not supported by request handler.
Since:
3.0
Author:
Arjen Poutsma
See Also:
  • Constructor Details

    • HttpMediaTypeNotSupportedException

      public HttpMediaTypeNotSupportedException(String message)
      Create a new HttpMediaTypeNotSupportedException.
      Parameters:
      message - the exception message
    • HttpMediaTypeNotSupportedException

      public HttpMediaTypeNotSupportedException(@Nullable MediaType contentType, List<MediaType> supportedMediaTypes)
      Create a new HttpMediaTypeNotSupportedException.
      Parameters:
      contentType - the unsupported content type
      supportedMediaTypes - the list of supported media types
    • HttpMediaTypeNotSupportedException

      public HttpMediaTypeNotSupportedException(@Nullable MediaType contentType, List<MediaType> supportedMediaTypes, String msg)
      Create a new HttpMediaTypeNotSupportedException.
      Parameters:
      contentType - the unsupported content type
      supportedMediaTypes - the list of supported media types
      msg - the detail message
  • Method Details

    • getContentType

      @Nullable public MediaType getContentType()
      Return the HTTP request content type method that caused the failure.