spring-framework / org.springframework.web.server / NotAcceptableStatusException

NotAcceptableStatusException

open class NotAcceptableStatusException : ResponseStatusException

Exception for errors that fit response status 406 (not acceptable).

Author
Rossen Stoyanchev

Since
5.0

Constructors

<init>

NotAcceptableStatusException(reason: String)

Constructor for when the requested Content-Type is invalid.

NotAcceptableStatusException(supportedMediaTypes: MutableList<MediaType>)

Constructor for when requested Content-Type is not supported.

Functions

getSupportedMediaTypes

open fun getSupportedMediaTypes(): MutableList<MediaType>

Return the list of supported content types in cases when the Accept header is parsed but not supported, or an empty list otherwise.