Class HttpResponseException
- 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
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ClientAuthenticationException,ResourceExistsException,ResourceModifiedException,ResourceNotFoundException,TooManyRedirectsException
public class HttpResponseException extends com.azure.android.core.exception.AzureExceptionThe exception thrown when an unsuccessful response is received with http status code (e.g. 3XX, 4XX, 5XX) from the service request.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HttpResponseException(HttpResponse response)Initializes a new instance of the HttpResponseException class.HttpResponseException(HttpResponse response, java.lang.Throwable cause)Initializes a new instance of the HttpResponseException class.HttpResponseException(java.lang.String message, HttpResponse response)Initializes a new instance of the HttpResponseException class.HttpResponseException(java.lang.String message, HttpResponse response, java.lang.Object value)Initializes a new instance of the HttpResponseException class.HttpResponseException(java.lang.String message, HttpResponse response, java.lang.Throwable cause)Initializes a new instance of the HttpResponseException class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpResponsegetResponse()java.lang.ObjectgetValue()
-
-
-
Constructor Detail
-
HttpResponseException
public HttpResponseException(HttpResponse response)
Initializes a new instance of the HttpResponseException class.- Parameters:
response- TheHttpResponsereceived that is associated to the exception.
-
HttpResponseException
public HttpResponseException(java.lang.String message, HttpResponse response)Initializes a new instance of the HttpResponseException class.- Parameters:
message- The exception message.response- TheHttpResponsereceived that is associated to the exception.
-
HttpResponseException
public HttpResponseException(HttpResponse response, java.lang.Throwable cause)
Initializes a new instance of the HttpResponseException class.- Parameters:
response- TheHttpResponsereceived that is associated to the exception.cause- TheThrowablewhich caused the creation of this exception.
-
HttpResponseException
public HttpResponseException(java.lang.String message, HttpResponse response, java.lang.Object value)Initializes a new instance of the HttpResponseException class.- Parameters:
message- The exception message.response- TheHttpResponsereceived that is associated to the exception.value- The deserialized response value.
-
HttpResponseException
public HttpResponseException(java.lang.String message, HttpResponse response, java.lang.Throwable cause)Initializes a new instance of the HttpResponseException class.- Parameters:
message- The exception message.response- TheHttpResponsereceived that is associated to the exception.cause- TheThrowablewhich caused the creation of this exception.
-
-
Method Detail
-
getResponse
public HttpResponse getResponse()
- Returns:
- The
HttpResponsereceived that is associated to the exception.
-
getValue
public java.lang.Object getValue()
- Returns:
- The deserialized HTTP response value.
-
-