Class NotAcceptableStatusException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.web.ErrorResponseException
org.springframework.web.server.ResponseStatusException
org.springframework.web.server.NotAcceptableStatusException
- All Implemented Interfaces:
- Serializable, ErrorResponse
Exception for errors that fit response status 406 (not acceptable).
- Since:
- 5.0
- Author:
- Rossen Stoyanchev
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface ErrorResponseErrorResponse.Builder, ErrorResponse.Interceptor
- 
Constructor SummaryConstructorsConstructorDescriptionNotAcceptableStatusException(String reason) Constructor for when the requested Content-Type is invalid.NotAcceptableStatusException(List<MediaType> mediaTypes) Constructor for when the requested Content-Type is not supported.
- 
Method SummaryModifier and TypeMethodDescriptionReturn HttpHeaders with an "Accept" header that documents the supported media types, if available, or an empty instance otherwise.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 ResponseStatusExceptiongetMessage, getReason, updateAndGetBodyMethods inherited from class ErrorResponseExceptiongetBody, getDetailMessageArguments, getDetailMessageCode, getStatusCode, setDetail, setInstance, setTitle, setTypeMethods inherited from class NestedRuntimeExceptioncontains, getMostSpecificCause, getRootCauseMethods inherited from class ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ErrorResponsegetDetailMessageArguments, getTitleMessageCode, getTypeMessageCode
- 
Constructor Details- 
NotAcceptableStatusExceptionConstructor for when the requested Content-Type is invalid.
- 
NotAcceptableStatusException
 
- 
- 
Method Details- 
getHeadersReturn HttpHeaders with an "Accept" header that documents the supported media types, if available, or an empty instance otherwise.- Specified by:
- getHeadersin interface- ErrorResponse
- Overrides:
- getHeadersin class- ResponseStatusException
 
- 
getSupportedMediaTypes
 
-