#[non_exhaustive]pub enum Error {
Show 21 variants
TimedOut(Box<Error>),
GrpcStatus(Status),
FromProtobuf(Box<dyn StdError + Send + Sync + 'static>),
FreezeUnsetNodeAccountIds,
TransactionPreCheckStatus {
status: Status,
transaction_id: Box<TransactionId>,
cost: Option<Hbar>,
},
QueryPreCheckStatus {
status: Status,
transaction_id: Box<TransactionId>,
},
QueryPaymentPreCheckStatus {
status: Status,
transaction_id: Box<TransactionId>,
},
QueryNoPaymentPreCheckStatus {
status: Status,
},
BasicParse(Box<dyn StdError + Send + Sync + 'static>),
BadEntityId {
shard: u64,
realm: u64,
num: u64,
present_checksum: Checksum,
expected_checksum: Checksum,
},
CannotCreateChecksum,
KeyParse(Box<dyn StdError + Send + Sync + 'static>),
KeyDerive(Box<dyn StdError + Send + Sync + 'static>),
MnemonicParse {
reason: MnemonicParseError,
mnemonic: Mnemonic,
},
MnemonicEntropy(MnemonicEntropyError),
NoPayerAccountOrTransactionId,
MaxQueryPaymentExceeded {
max_query_payment: Hbar,
query_cost: Hbar,
},
NodeAccountUnknown(Box<AccountId>),
ResponseStatusUnrecognized(i32),
ReceiptStatus {
status: Status,
transaction_id: Option<Box<TransactionId>>,
},
SignatureVerify(Box<dyn StdError + Send + Sync + 'static>),
}Expand description
Represents any possible error from a fallible function in the Hiero SDK.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TimedOut(Box<Error>)
Request timed out.
GrpcStatus(Status)
GRPC status code was an error.
FromProtobuf(Box<dyn StdError + Send + Sync + 'static>)
Failed to parse an SDK type from a protobuf response.
FreezeUnsetNodeAccountIds
Freeze failed due to there being no explicitly set node account IDs and no client being provided to generate them.
TransactionPreCheckStatus
A transaction failed pre-check.
The transaction had the ID transaction_id.
Caused by status being an error.
Fields
status: StatusThe status that caused the Transaction to fail pre-check.
transaction_id: Box<TransactionId>The TransactionId of the failed Transaction .
QueryPreCheckStatus
A Query for transaction_id failed pre-check.
Caused by status being an error.
Fields
transaction_id: Box<TransactionId>The associated transaction’s ID.
QueryPaymentPreCheckStatus
A Query failed pre-check.
The query had an associated PaymentTransaction with ID transaction_id.
Caused by status being an error.
Fields
transaction_id: Box<TransactionId>The associated PaymentTransaction’s TransactionId.
QueryNoPaymentPreCheckStatus
BasicParse(Box<dyn StdError + Send + Sync + 'static>)
Failed to parse a basic type from string
(ex. AccountId, ContractId, TransactionId, etc.).
BadEntityId
An entity ID had an invalid checksum
Fields
present_checksum: ChecksumThe (invalid) checksum that was present on the entity ID
expected_checksum: ChecksumThe checksum that SHOULD HAVE BEEN on the entity ID
CannotCreateChecksum
An entity ID cannot be converted to a string with a checksum, because it is in an alternate form,
such as an alias or evm_address
KeyParse(Box<dyn StdError + Send + Sync + 'static>)
Failed to parse a PublicKey or PrivateKey.
KeyDerive(Box<dyn StdError + Send + Sync + 'static>)
Failed to derive a PrivateKey from another PrivateKey.
Examples of when this can happen (non-exhaustive):
PrivateKey::derivewhen thePrivateKeydoesn’t have a chain code.PrivateKey::deriveorPrivateKey::legacy_deriveon anEcsdakey.
MnemonicParse
Failed to parse a Mnemonic due to the given reason.
the Mnemonic is provided because invalid Mnemonics
can technically still provide valid PrivateKeys.
MnemonicEntropy(MnemonicEntropyError)
An error occurred while attempting to convert a Mnemonic to a PrivateKey
NoPayerAccountOrTransactionId
The Client had no payer account (operator)
and the attempted request had no explicit TransactionId.
MaxQueryPaymentExceeded
Cost of a Query is more expensive than max_query_payment.
The actual cost of the Query is query_cost.
Fields
NodeAccountUnknown(Box<AccountId>)
The associated node account was not found in the network.
ResponseStatusUnrecognized(i32)
Received an unrecognized status code from the Hiero Network.
This can happen when the SDK is outdated, try updating your SDK.
ReceiptStatus
Getting the receipt for transaction_id failed with status.
Fields
transaction_id: Option<Box<TransactionId>>The Transaction’s ID.
SignatureVerify(Box<dyn StdError + Send + Sync + 'static>)
Failed to verify a signature.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<MnemonicEntropyError> for Error
impl From<MnemonicEntropyError> for Error
Source§fn from(source: MnemonicEntropyError) -> Self
fn from(source: MnemonicEntropyError) -> Self
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request