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, ErrorResponse
Exception thrown when the request handler cannot generate a response that is
acceptable by the client.
- Since:
- 3.0
- Author:
- Arjen Poutsma
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface ErrorResponse
ErrorResponse.Builder, ErrorResponse.Interceptor
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for when theAccept
header cannot be parsed.HttpMediaTypeNotAcceptableException
(List<MediaType> mediaTypes) Create a new HttpMediaTypeNotSupportedException. -
Method Summary
Modifier and TypeMethodDescriptionReturn headers to use for the response.Return the HTTP status code to use for the response.Methods inherited from class HttpMediaTypeException
getBody, getDetailMessageArguments, getDetailMessageCode, getSupportedMediaTypes
Methods inherited from class jakarta.servlet.ServletException
getRootCause
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ErrorResponse
getDetailMessageArguments, getTitleMessageCode, getTypeMessageCode, updateAndGetBody
-
Constructor Details
-
HttpMediaTypeNotAcceptableException
Constructor for when theAccept
header cannot be parsed.- Parameters:
message
- the parse error message
-
HttpMediaTypeNotAcceptableException
-
-
Method Details
-
getStatusCode
Description copied from interface:ErrorResponse
Return the HTTP status code to use for the response. -
getHeaders
Description copied from interface:ErrorResponse
Return headers to use for the response.
-