Class NetworkException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AccountNotFoundException, BadRequestException, BadResponseException, ConnectionErrorException, FederationServerInvalidException, NoFederationServerException, NotFoundException, RequestTimeoutException, SorobanRpcException, StellarTomlNotFoundInvalidException, TooManyRequestsException, UnknownResponseException

public class NetworkException extends SdkException
Represents an exception that occurs during network operations in the Stellar SDK.

This exception is thrown in the following cases:

  • When the server returns a non-2xx status code
  • When the error field in the information returned by the RPC server is not empty.
  • When the required resources are not found on the server, such as when an account does not exist.
  • When a request times out
  • When a request cannot be executed due to cancellation or connectivity problems, etc.
See Also:
  • Constructor Details

  • Method Details

    • getCode

      public Integer getCode()
      The status code of the response.
    • getBody

      public String getBody()
      The raw body of the response.