org.springframework.web.server

Class MediaTypeNotSupportedStatusException

  • All Implemented Interfaces:
    java.io.Serializable


    public class MediaTypeNotSupportedStatusException
    extends ResponseStatusException
    Exception for errors that fit response status 415 (unsupported media type).
    Since:
    5.0
    Author:
    Rossen Stoyanchev
    See Also:
    Serialized Form
    • Constructor Detail

      • MediaTypeNotSupportedStatusException

        public MediaTypeNotSupportedStatusException(java.lang.String reason)
        Constructor for when the Content-Type is invalid.
      • MediaTypeNotSupportedStatusException

        public MediaTypeNotSupportedStatusException(java.util.List<MediaType> supportedMediaTypes)
        Constructor for when the Content-Type is not supported.
    • Method Detail

      • getSupportedMediaTypes

        public java.util.List<MediaType> getSupportedMediaTypes()
        Return the list of supported content types in cases when the Accept header is parsed but not supported, or an empty list otherwise.