Class UnsupportedMediaException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.micronaut.http.exceptions.HttpException
io.micronaut.http.exceptions.HttpStatusException
io.micronaut.http.server.exceptions.UnsupportedMediaException
- All Implemented Interfaces:
Serializable
Exception thrown when the requested Content-Type is not supported.
- Since:
- 4.6.0
- Author:
- Sergio del Amo
- See Also:
-
Constructor Summary
ConstructorDescriptionUnsupportedMediaException
(String contentType, Collection<String> acceptableContentTypes) -
Method Summary
Modifier and TypeMethodDescriptionMethods inherited from class io.micronaut.http.exceptions.HttpStatusException
getBody, getStatus
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
UnsupportedMediaException
- Parameters:
contentType
- Requested Content TypeacceptableContentTypes
- Acceptable content types
-
-
Method Details
-
getContentType
- Returns:
- Requested Content Type
-
getAcceptableContentTypes
- Returns:
- Acceptable content types
-