Class HttpClientResponseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.micronaut.http.exceptions.HttpException
io.micronaut.http.client.exceptions.HttpClientException
io.micronaut.http.client.exceptions.HttpClientResponseException
- All Implemented Interfaces:
io.micronaut.http.HttpResponseProvider,Serializable
public class HttpClientResponseException
extends HttpClientException
implements io.micronaut.http.HttpResponseProvider
An exception that occurs when a response returns an error code equal to or greater than 400.
- Since:
- 1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHttpClientResponseException(String message, io.micronaut.http.HttpResponse<?> response) HttpClientResponseException(String message, Throwable cause, io.micronaut.http.HttpResponse<?> response) HttpClientResponseException(String message, Throwable cause, io.micronaut.http.HttpResponse<?> response, HttpClientErrorDecoder errorDecoder) -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.http.HttpResponse<?>io.micronaut.http.HttpStatusMethods inherited from class io.micronaut.http.client.exceptions.HttpClientException
getServiceId, setServiceIdMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpClientResponseException
- Parameters:
message- The messageresponse- The Http response
-
HttpClientResponseException
public HttpClientResponseException(String message, Throwable cause, io.micronaut.http.HttpResponse<?> response) - Parameters:
message- The messagecause- The throwableresponse- The Http response
-
HttpClientResponseException
public HttpClientResponseException(String message, Throwable cause, io.micronaut.http.HttpResponse<?> response, HttpClientErrorDecoder errorDecoder) - Parameters:
message- The messagecause- The throwableresponse- The Http responseerrorDecoder- The error decoder
-
-
Method Details
-
getMessage
- Overrides:
getMessagein classHttpClientException
-
getResponse
public io.micronaut.http.HttpResponse<?> getResponse()- Specified by:
getResponsein interfaceio.micronaut.http.HttpResponseProvider- Returns:
- The
HttpResponse
-
getStatus
public io.micronaut.http.HttpStatus getStatus()- Returns:
- The
HttpStatusreturned
-