Class HttpTransportException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MirrorNodeHttpException

public class HttpTransportException extends RuntimeException
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 Details

    • HttpTransportException

      public HttpTransportException(HttpTransportErrorKind kind, String message, @Nullable Throwable cause)
      Constructor.
      Parameters:
      kind - the identifier this failure carries
      message - the detail message
      cause - the underlying failure, may be null
    • HttpTransportException

      public HttpTransportException(HttpTransportErrorKind kind, String message)
      Constructor.
      Parameters:
      kind - the identifier this failure carries
      message - the detail message
  • Method Details

    • getKind

      public HttpTransportErrorKind 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