Class ClientAuthenticationException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ClientAuthenticationException
    extends HttpResponseException
    The exception thrown when failed to authenticate the client request with status code of 4XX, typically 401 unauthorized. A runtime exception indicating request authorization failure caused by one of the following scenarios:
    • A client did not send the required authorization credentials to access the requested resource, i.e. Authorization HTTP header is missing in the request
    • If the request contains the HTTP Authorization header, then the exception indicates that authorization has been refused for the credentials contained in the request header.
    See Also:
    Serialized Form
    • Constructor Detail

      • ClientAuthenticationException

        public ClientAuthenticationException​(java.lang.String message,
                                             HttpResponse response)
        Initializes a new instance of the ClientAuthenticationException class.
        Parameters:
        message - The exception message or the response content if a message is not available.
        response - The HTTP response with the authorization failure.
      • ClientAuthenticationException

        public ClientAuthenticationException​(java.lang.String message,
                                             HttpResponse response,
                                             java.lang.Object value)
        Initializes a new instance of the ClientAuthenticationException class.
        Parameters:
        message - The exception message or the response content if a message is not available.
        response - The HTTP response with the authorization failure.
        value - The deserialized HTTP response value.
      • ClientAuthenticationException

        public ClientAuthenticationException​(java.lang.String message,
                                             HttpResponse response,
                                             java.lang.Throwable cause)
        Initializes a new instance of the ClientAuthenticationException class.
        Parameters:
        message - The exception message or the response content if a message is not available.
        response - The HTTP response with the authorization failure.
        cause - The Throwable which caused the creation of this exception.