Class ClientAuthenticationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.azure.android.core.exception.AzureException
-
- com.azure.android.core.http.exception.HttpResponseException
-
- com.azure.android.core.http.exception.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 Summary
Constructors Constructor Description ClientAuthenticationException(java.lang.String message, HttpResponse response)
Initializes a new instance of theClientAuthenticationException
class.ClientAuthenticationException(java.lang.String message, HttpResponse response, java.lang.Object value)
Initializes a new instance of theClientAuthenticationException
class.ClientAuthenticationException(java.lang.String message, HttpResponse response, java.lang.Throwable cause)
Initializes a new instance of theClientAuthenticationException
class.
-
Method Summary
-
Methods inherited from class com.azure.android.core.http.exception.HttpResponseException
getResponse, getValue
-
-
-
-
Constructor Detail
-
ClientAuthenticationException
public ClientAuthenticationException(java.lang.String message, HttpResponse response)
Initializes a new instance of theClientAuthenticationException
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 theClientAuthenticationException
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 theClientAuthenticationException
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
- TheThrowable
which caused the creation of this exception.
-
-