Enum solana_sdk::transaction::TransactionError[][src]

pub enum TransactionError {
Show 17 variants AccountInUse, AccountLoadedTwice, AccountNotFound, ProgramAccountNotFound, InsufficientFundsForFee, InvalidAccountForFee, AlreadyProcessed, BlockhashNotFound, InstructionError(u8, InstructionError), CallChainTooDeep, MissingSignatureForFee, InvalidAccountIndex, SignatureFailure, InvalidProgramForExecution, SanitizeFailure, ClusterMaintenance, AccountBorrowOutstanding,
}
Expand description

Reasons a transaction might be rejected.

Variants

AccountInUse

An account is already being processed in another transaction in a way that does not support parallelism

AccountLoadedTwice

A Pubkey appears twice in the transaction’s account_keys. Instructions can reference Pubkeys more than once but the message must contain a list with no duplicate keys

AccountNotFound

Attempt to debit an account but found no record of a prior credit.

ProgramAccountNotFound

Attempt to load a program that does not exist

InsufficientFundsForFee

The from Pubkey does not have sufficient balance to pay the fee to schedule the transaction

InvalidAccountForFee

This account may not be used to pay transaction fees

AlreadyProcessed

The bank has seen this transaction before. This can occur under normal operation when a UDP packet is duplicated, as a user error from a client not updating its recent_blockhash, or as a double-spend attack.

BlockhashNotFound

The bank has not seen the given recent_blockhash or the transaction is too old and the recent_blockhash has been discarded.

InstructionError

An error occurred while processing an instruction. The first element of the tuple indicates the instruction index in which the error occurred.

Tuple Fields of InstructionError

0: u81: InstructionError
CallChainTooDeep

Loader call chain is too deep

MissingSignatureForFee

Transaction requires a fee but has no signature present

InvalidAccountIndex

Transaction contains an invalid account reference

SignatureFailure

Transaction did not pass signature verification

InvalidProgramForExecution

This program may not be used for executing instructions

SanitizeFailure

Transaction failed to sanitize accounts offsets correctly implies that account locks are not taken for this TX, and should not be unlocked.

ClusterMaintenance
AccountBorrowOutstanding

Transaction processing left an account with an outstanding borrowed reference

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Converts a reference to Self into a dynamic trait object of Fail.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the “name” of the error. Read more

Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more

Returns a reference to the Backtrace carried by this failure, if it carries one. Read more

Provides context for this failure. Read more

Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.