Package org.springframework.web
Class HttpMediaTypeNotAcceptableException
java.lang.Object
java.lang.Throwable
java.lang.Exception
jakarta.servlet.ServletException
org.springframework.web.HttpMediaTypeException
org.springframework.web.HttpMediaTypeNotAcceptableException
- All Implemented Interfaces:
Serializable
Exception thrown when the request handler cannot generate a response that is acceptable by the client.
- Since:
- 3.0
- Author:
- Arjen Poutsma
- See Also:
-
Constructor Summary
ConstructorDescriptionCreate a new HttpMediaTypeNotAcceptableException.HttpMediaTypeNotAcceptableException
(List<MediaType> supportedMediaTypes) Create a new HttpMediaTypeNotSupportedException. -
Method Summary
Methods inherited from class org.springframework.web.HttpMediaTypeException
getSupportedMediaTypes
Methods inherited from class jakarta.servlet.ServletException
getRootCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpMediaTypeNotAcceptableException
Create a new HttpMediaTypeNotAcceptableException.- Parameters:
message
- the exception message
-
HttpMediaTypeNotAcceptableException
Create a new HttpMediaTypeNotSupportedException.- Parameters:
supportedMediaTypes
- the list of supported media types
-