Package org.springframework.web.server
Class MediaTypeNotSupportedStatusException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- java.lang.RuntimeException
- org.springframework.core.NestedRuntimeException
- org.springframework.web.server.ResponseStatusException
- org.springframework.web.server.MediaTypeNotSupportedStatusException
- All Implemented Interfaces:
Serializable
@Deprecated public class MediaTypeNotSupportedStatusException extends ResponseStatusException
Deprecated.in favor ofUnsupportedMediaTypeStatusException
, with this class never thrown by Spring code and to be removed in 5.3Exception for errors that fit response status 415 (unsupported media type).- Since:
- 5.0
- Author:
- Rossen Stoyanchev
- See Also:
- Serialized Form
Constructor Summary
Constructors Constructor Description MediaTypeNotSupportedStatusException(String reason)
Deprecated.Constructor for when the Content-Type is invalid.MediaTypeNotSupportedStatusException(List<MediaType> supportedMediaTypes)
Deprecated.Constructor for when the Content-Type is not supported.
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<MediaType>
getSupportedMediaTypes()
Deprecated.Return the list of supported content types in cases when the Accept header is parsed but not supported, or an empty list otherwise.Methods inherited from class org.springframework.web.server.ResponseStatusException
getHeaders, getMessage, getReason, getResponseHeaders, getStatus
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMostSpecificCause, getRootCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Constructor Detail
MediaTypeNotSupportedStatusException
public MediaTypeNotSupportedStatusException(String reason)
Deprecated.Constructor for when the Content-Type is invalid.
MediaTypeNotSupportedStatusException
public MediaTypeNotSupportedStatusException(List<MediaType> supportedMediaTypes)
Deprecated.Constructor for when the Content-Type is not supported.
Method Detail
getSupportedMediaTypes
public List<MediaType> getSupportedMediaTypes()
Deprecated.Return the list of supported content types in cases when the Accept header is parsed but not supported, or an empty list otherwise.