#[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>,
},
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 Hedera 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
Fields
status: Status
The status that caused the Transaction
to fail pre-check.
transaction_id: Box<TransactionId>
The TransactionId
of the failed Transaction
.
A transaction failed pre-check.
The transaction had the ID transaction_id
.
Caused by status
being an error.
QueryPreCheckStatus
Fields
transaction_id: Box<TransactionId>
The associated transaction’s ID.
A Query
for transaction_id
failed pre-check.
Caused by status
being an error.
QueryPaymentPreCheckStatus
Fields
transaction_id: Box<TransactionId>
The associated PaymentTransaction
’s TransactionId
.
A Query
failed pre-check.
The query had an associated PaymentTransaction
with ID transaction_id
.
Caused by status
being an error.
QueryNoPaymentPreCheckStatus
BasicParse(Box<dyn StdError + Send + Sync + 'static>)
Failed to parse a basic type from string
(ex. AccountId
, ContractId
, TransactionId
, etc.).
BadEntityId
Fields
present_checksum: Checksum
The (invalid) checksum that was present on the entity ID
expected_checksum: Checksum
The checksum that SHOULD HAVE BEEN on the entity ID
An entity ID had an invalid checksum
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::derive
when thePrivateKey
doesn’t have a chain code.PrivateKey::derive
orPrivateKey::legacy_derive
on anEcsda
key.
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
Fields
Cost of a Query
is more expensive than max_query_payment
.
The actual cost of the Query
is query_cost
.
NodeAccountUnknown(Box<AccountId>)
The associated node account was not found in the network.
ResponseStatusUnrecognized(i32)
Received an unrecognized status code from the Hedera Network.
This can happen when the SDK is outdated, try updating your SDK.
ReceiptStatus
Fields
transaction_id: Option<Box<TransactionId>>
The Transaction
’s ID.
Getting the receipt for transaction_id
failed with status
.
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
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 !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