- All Implemented Interfaces:
Serializable,Comparable<HttpTransportErrorKind>,Constable
HttpTransport fails with.
These are the same seven identifiers in every Hiero SDK, so a test asserting on one asserts the same thing in every language. The second property of each is whether repeating the exchange can help: without it a mistyped host name would cost the whole attempt budget before an obvious error surfaced, and certificate validation would be re-run purely to burn attempts.
A transport failure that cannot be classified as one of these is treated as non-retryable. That is the safe direction: a wrongly terminal error surfaces a visible failure after one attempt, while a wrongly retryable one costs the whole budget and hides the cause.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe caller cancelled the call.The transport was closed.The connection was refused, reset, or the peer was unreachable.The call's total deadline elapsed, or an honouredRetry-Afterexceeded the time left in it.The response body exceededHttpTransportConfiguration.getMaxResponseBytes().A retryable status survived every attempt.The per-attempt deadline elapsed.Certificate verification or the TLS handshake failed.The host name does not resolve. -
Method Summary
Modifier and TypeMethodDescriptiongetId()Extract the cross-SDK identifier, such as"connection-error".booleanWhether repeating the exchange can help.toString()static HttpTransportErrorKindReturns the enum constant of this class with the specified name.static HttpTransportErrorKind[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CONNECTION_ERROR
The connection was refused, reset, or the peer was unreachable. Retryable. -
TIMEOUT_ERROR
The per-attempt deadline elapsed. Retryable. -
UNKNOWN_HOST_ERROR
The host name does not resolve.Every name resolution failure maps here, including a transient
SERVFAIL:UnknownHostExceptioncarries no code and no fields, so one SDK cannot tell a permanent failure from a temporary one. Not retryable. -
TLS_ERROR
Certificate verification or the TLS handshake failed. Not retryable. -
CLIENT_CLOSED_ERROR
The transport was closed. Not retryable. -
CANCELLED_ERROR
The caller cancelled the call. Not retryable. -
RESPONSE_TOO_LARGE_ERROR
The response body exceededHttpTransportConfiguration.getMaxResponseBytes(). Not retryable. -
RETRIES_EXHAUSTED_ERROR
A retryable status survived every attempt.Raised by the mirror node REST adapter rather than by a transport, and distinct from
DEADLINE_EXCEEDED_ERROR: a node failing repeatedly is not the clock running out. -
DEADLINE_EXCEEDED_ERROR
The call's total deadline elapsed, or an honouredRetry-Afterexceeded the time left in it.Raised by the mirror node REST adapter rather than by a transport.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getId
Extract the cross-SDK identifier, such as"connection-error".- Returns:
- the identifier
-
isRetryable
public boolean isRetryable()Whether repeating the exchange can help.- Returns:
- true if the failure is retryable
-
toString
- Overrides:
toStringin classEnum<HttpTransportErrorKind>
-