Class HttpClientResponseException

  • All Implemented Interfaces:
    io.micronaut.http.HttpResponseProvider, java.io.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:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getMessage()  
      io.micronaut.http.HttpResponse<?> getResponse()  
      io.micronaut.http.HttpStatus getStatus()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • HttpClientResponseException

        public HttpClientResponseException​(java.lang.String message,
                                           io.micronaut.http.HttpResponse<?> response)
        Parameters:
        message - The message
        response - The Http response
      • HttpClientResponseException

        public HttpClientResponseException​(java.lang.String message,
                                           java.lang.Throwable cause,
                                           io.micronaut.http.HttpResponse<?> response)
        Parameters:
        message - The message
        cause - The throwable
        response - The Http response
      • HttpClientResponseException

        public HttpClientResponseException​(java.lang.String message,
                                           java.lang.Throwable cause,
                                           io.micronaut.http.HttpResponse<?> response,
                                           HttpClientErrorDecoder errorDecoder)
        Parameters:
        message - The message
        cause - The throwable
        response - The Http response
        errorDecoder - The error decoder
    • Method Detail

      • getMessage

        public java.lang.String getMessage()
        Overrides:
        getMessage in class java.lang.Throwable
      • getResponse

        public io.micronaut.http.HttpResponse<?> getResponse()
        Specified by:
        getResponse in interface io.micronaut.http.HttpResponseProvider
        Returns:
        The HttpResponse
      • getStatus

        public io.micronaut.http.HttpStatus getStatus()
        Returns:
        The HttpStatus returned