Class HttpMediaTypeException

All Implemented Interfaces:
Serializable, ErrorResponse
Direct Known Subclasses:
HttpMediaTypeNotAcceptableException, HttpMediaTypeNotSupportedException

public abstract class HttpMediaTypeException extends ServletException implements ErrorResponse
Abstract base for exceptions related to media types. Adds a list of supported MediaTypes.
Since:
3.0
Author:
Arjen Poutsma
See Also:
  • Constructor Details

    • HttpMediaTypeException

      @Deprecated protected HttpMediaTypeException(String message)
      Deprecated.
      as of 6.0
      Create a new HttpMediaTypeException.
      Parameters:
      message - the exception message
    • HttpMediaTypeException

      @Deprecated protected HttpMediaTypeException(String message, List<MediaType> supportedMediaTypes)
      Deprecated.
      as of 6.0
      Create a new HttpMediaTypeException with a list of supported media types.
      Parameters:
      supportedMediaTypes - the list of supported media types
    • HttpMediaTypeException

      protected HttpMediaTypeException(@Nullable String message, List<MediaType> supportedMediaTypes, @Nullable String messageDetailCode, @Nullable Object[] messageDetailArguments)
      Create a new HttpMediaTypeException with a list of supported media types.
      Parameters:
      supportedMediaTypes - the list of supported media types
      messageDetailCode - the code to use to resolve the problem "detail" through a MessageSource
      messageDetailArguments - the arguments to make available when resolving the problem "detail" through a MessageSource
      Since:
      6.0
  • Method Details