java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.hedera.hashgraph.sdk.HttpTransportException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MirrorNodeHttpException
A failure to obtain an HTTP response, carrying one of the cross-SDK
HttpTransportErrorKind identifiers.
A non-2xx status is not one of these — it is a successful exchange, returned as an
HttpResponse carrying its status code. Only a failure to obtain a response at all is
signalled this way.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHttpTransportException(HttpTransportErrorKind kind, String message) Constructor.HttpTransportException(HttpTransportErrorKind kind, String message, @Nullable Throwable cause) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetKind()Extract the identifier this failure carries.booleanWhether repeating the exchange can help.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpTransportException
public HttpTransportException(HttpTransportErrorKind kind, String message, @Nullable Throwable cause) Constructor.- Parameters:
kind- the identifier this failure carriesmessage- the detail messagecause- the underlying failure, may be null
-
HttpTransportException
Constructor.- Parameters:
kind- the identifier this failure carriesmessage- the detail message
-
-
Method Details
-
getKind
Extract the identifier this failure carries.- Returns:
- the identifier
-
isRetryable
public boolean isRetryable()Whether repeating the exchange can help.- Returns:
- true if the failure is retryable
-