pub enum Error {
UnknownNetwork(String),
MissingEndpoint(String),
Denom(String),
Address(String),
InvalidMnemonic,
Derivation(String),
Pqc(String),
Http {
status: u16,
url: String,
body: String,
},
JsonRpc {
code: i64,
message: String,
},
Transport(String),
InvalidResponse(String),
Tx(QoreTxError),
}Expand description
Errors returned across the QoreChain SDK.
Variants§
UnknownNetwork(String)
The named network preset is unknown.
MissingEndpoint(String)
A required endpoint URL was not configured.
Denom(String)
A decimal/base amount or exponent was invalid.
Address(String)
A bech32 or hex address was invalid.
InvalidMnemonic
The BIP-39 mnemonic failed word-list and/or checksum validation.
Derivation(String)
HD derivation produced an invalid key (caller should try the next index).
Pqc(String)
A post-quantum (ML-DSA-87) operation failed.
Http
A non-2xx HTTP response was received.
Fields
JsonRpc
A JSON-RPC response carried an error member.
Transport(String)
A network/transport error occurred.
InvalidResponse(String)
A response body could not be parsed as expected JSON.
Tx(QoreTxError)
A broadcast/confirmed transaction returned a non-zero ABCI result code.
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<QoreTxError> for Error
impl From<QoreTxError> for Error
Source§fn from(source: QoreTxError) -> Self
fn from(source: QoreTxError) -> 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 UnsafeUnpin 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