Class NotAcceptableException
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.NotAcceptableException
- All Implemented Interfaces:
Serializable
Exception thrown when none of the produceable content types matches any of the accepted types.
- Since:
- 4.6.0
- Author:
- Sergio del Amo
- See Also:
-
Constructor Summary
ConstructorDescriptionNotAcceptableException
(Collection<String> acceptedTypes, Collection<String> produceableContentTypes) -
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
-
NotAcceptableException
public NotAcceptableException(Collection<String> acceptedTypes, Collection<String> produceableContentTypes) - Parameters:
acceptedTypes
- Accepted types as signaled in the RequestproduceableContentTypes
- types that the server can produce
-
-
Method Details
-
getAcceptedTypes
- Returns:
- Accepted types as signaled in the Request
-
getProduceableContentTypes
- Returns:
- types that the server can produce
-