Package com.azure.core.exception
Class HttpRequestException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.azure.core.exception.AzureException
com.azure.core.exception.HttpRequestException
- All Implemented Interfaces:
Serializable
The exception when an HTTP request fails.
Generally, these errors are safe to retry.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHttpRequestException
(HttpRequest request) Initializes a new instance of the HttpRequestException class.HttpRequestException
(HttpRequest request, Throwable cause) Initializes a new instance of the HttpRequestException class.HttpRequestException
(String message, HttpRequest request) Initializes a new instance of the HttpRequestException class.HttpRequestException
(String message, HttpRequest request, Throwable cause) Initializes a new instance of the HttpRequestException class.HttpRequestException
(String message, HttpRequest request, Throwable cause, boolean enableSuppression, boolean writableStackTrace) Initializes a new instance of the HttpRequestException class. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpRequestException
Initializes a new instance of the HttpRequestException class.- Parameters:
request
- TheHttpRequest
being sent when the exception occurred.
-
HttpRequestException
Initializes a new instance of the HttpRequestException class.- Parameters:
message
- The exception message.request
- the HTTP request sends to the Azure service
-
HttpRequestException
Initializes a new instance of the HttpRequestException class.- Parameters:
request
- TheHttpRequest
being sent when the exception occurred.cause
- TheThrowable
which caused the creation of this HttpRequestException.
-
HttpRequestException
Initializes a new instance of the HttpRequestException class.- Parameters:
message
- The exception message.request
- TheHttpRequest
being sent when the exception occurred.cause
- TheThrowable
which caused the creation of this HttpRequestException.
-
HttpRequestException
public HttpRequestException(String message, HttpRequest request, Throwable cause, boolean enableSuppression, boolean writableStackTrace) Initializes a new instance of the HttpRequestException class.- Parameters:
message
- The exception message.request
- TheHttpRequest
being sent when the exception occurred.cause
- TheThrowable
which caused the creation of this HttpRequestException.enableSuppression
- Whether suppression is enabled or disabled.writableStackTrace
- Whether the exception stack trace will be filled in.
-
-
Method Details
-
getRequest
- Returns:
- The
HttpRequest
being sent when the exception occurred.
-