pub enum Error {
Show 13 variants
InvalidRpc(InvalidRpcUrl),
XdrError,
JsonError(String),
NetworkError(Error),
AccountNotFound,
ContractDataNotFound,
TransactionError,
InvalidSorobanTransaction,
SimulationFailed(String),
RestorationRequired(i64, SorobanTransactionData),
RPCError {
code: i32,
message: String,
},
UnexpectedError,
NoFriendbot,
}
Expand description
Possible error types
Variants§
InvalidRpc(InvalidRpcUrl)
Error for invalid RPC URL
XdrError
Error when XDR processing fails
JsonError(String)
Error when JSON parsing fails, with a descriptive message
NetworkError(Error)
Error for network-related failures
AccountNotFound
Error when an account is not found
ContractDataNotFound
Error when contract data is missing
TransactionError
Error for general transaction failures
InvalidSorobanTransaction
Error for invalid Soroban transactions
SimulationFailed(String)
Error when a simulation fails
RestorationRequired(i64, SorobanTransactionData)
Error when restoration is required with additional data
RPCError
Error for RPC failures, includes code and message
Fields
UnexpectedError
Unexpected error, should be reported
NoFriendbot
Error when Friendbot is not available on the current network
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<InvalidRpcUrl> for Error
impl From<InvalidRpcUrl> for Error
Source§fn from(source: InvalidRpcUrl) -> Self
fn from(source: InvalidRpcUrl) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more