Package org.springframework.web.server
Class NotAcceptableStatusException
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.NotAcceptableStatusException
- All Implemented Interfaces:
- Serializable
Exception for errors that fit response status 406 (not acceptable).
- Since:
- 5.0
- Author:
- Rossen Stoyanchev
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionNotAcceptableStatusException(String reason) Constructor for when the requested Content-Type is invalid.NotAcceptableStatusException(List<MediaType> supportedMediaTypes) Constructor for when the requested Content-Type is not supported.
- 
Method SummaryModifier and TypeMethodDescriptionReturn HttpHeaders with an "Accept" header, or an empty instance.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.ResponseStatusExceptiongetMessage, getRawStatusCode, getReason, getStatusMethods inherited from class org.springframework.core.NestedRuntimeExceptioncontains, getMostSpecificCause, getRootCauseMethods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Constructor Details- 
NotAcceptableStatusExceptionConstructor for when the requested Content-Type is invalid.
- 
NotAcceptableStatusExceptionConstructor for when the requested Content-Type is not supported.
 
- 
- 
Method Details- 
getResponseHeadersReturn HttpHeaders with an "Accept" header, or an empty instance.- Overrides:
- getResponseHeadersin class- ResponseStatusException
- Since:
- 5.1.13
 
- 
getSupportedMediaTypesReturn the list of supported content types in cases when the Accept header is parsed but not supported, or an empty list otherwise.
 
-