Package io.quarkus.rest.client.reactive
Annotation Type ClientExceptionMapper
-
@Retention(RUNTIME) @Target(METHOD) public @interface ClientExceptionMapper
Used to easily define an exception mapper for the specific REST Client on which it's used. This method is called when the HTTP response from the invoked service has a status code of 400 or higher. The annotation MUST be placed on a method of the REST Client interface that meets the following criteria:- Is a
static
method - Returns any subclass of
RuntimeException
- Takes a single parameter of type
Response
@ClientExceptionMapper static DummyException map(Response response, Method method) { if (response.getStatus() == 404) { return new DummyException(); } return null; }
null
is returned, Quarkus will continue searching for matchingResponseExceptionMapper
. - Is a
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description int
priority
The priority with which the exception mapper will be executed
-