Package org.stellar.sdk.exception
Class NetworkException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.stellar.sdk.exception.SdkException
org.stellar.sdk.exception.NetworkException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AccountNotFoundException
,BadRequestException
,BadResponseException
,ConnectionErrorException
,FederationServerInvalidException
,NoFederationServerException
,NotFoundException
,RequestTimeoutException
,SorobanRpcException
,StellarTomlNotFoundInvalidException
,TooManyRequestsException
,UnknownResponseException
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 Summary
ConstructorDescriptionNetworkException
(Integer code, String body) NetworkException
(String message, Integer code, String body) NetworkException
(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, Integer code, String body) NetworkException
(String message, Throwable cause, Integer code, String body) NetworkException
(Throwable cause, Integer code, String body) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
NetworkException
-
NetworkException
-
NetworkException
-
NetworkException
-
NetworkException
-
-
Method Details
-
getCode
The status code of the response. -
getBody
The raw body of the response.
-