pub enum ClientError {
Show 18 variants
MissingUserPassword,
Server(i32, String),
Parse(String),
Param(String),
Body(String),
Status(String, String),
MalformedResponse(String),
Connection(String),
Timeout,
HttpRedirect(String),
ReqBuilder(String),
MaxRetriesExceeded(u8),
Request(String),
WrongNetworkAddress(Network),
UnexpectedServerVersion(UnexpectedServerVersionError),
Sign(SignRawTransactionWithWalletError),
Xpriv,
Other(String),
}
Expand description
The error type for errors produced in this library.
Variants§
MissingUserPassword
Missing username or password for the RPC server
Server(i32, String)
RPC server returned an error
§Note
These errors are ABSOLUTELY UNDOCUMENTED. Check https://github.com/bitcoin/bitcoin/blob/96b0a8f858ab24f3672360b8c830553b963de726/src/rpc/protocol.h#L24 and good luck!
Parse(String)
Param(String)
Error creating the RPC request, retry might help
Body(String)
Body error, unlikely to be recoverable by retrying
Status(String, String)
HTTP status error, not retryable
MalformedResponse(String)
Error decoding the response, retry might not help
Connection(String)
Connection error, retry might help
Timeout
Timeout error, retry might help
HttpRedirect(String)
Redirect error, not retryable
ReqBuilder(String)
Error building the request, unlikely to be recoverable
MaxRetriesExceeded(u8)
Maximum retries exceeded, not retryable
Request(String)
General request error, retry might help
WrongNetworkAddress(Network)
Wrong network address
UnexpectedServerVersion(UnexpectedServerVersionError)
Server version is unexpected or incompatible
Sign(SignRawTransactionWithWalletError)
Could not sign raw transaction
Xpriv
Could not get a Xpriv
from the wallet
Other(String)
Unknown error, unlikely to be recoverable
Implementations§
Source§impl ClientError
impl ClientError
pub fn is_tx_not_found(&self) -> bool
pub fn is_block_not_found(&self) -> bool
pub fn is_missing_or_invalid_input(&self) -> bool
Trait Implementations§
Source§impl Clone for ClientError
impl Clone for ClientError
Source§fn clone(&self) -> ClientError
fn clone(&self) -> ClientError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more