pub enum InvalidTxError {
Show 18 variants
InvalidAccessKeyError(InvalidAccessKeyError),
InvalidSignerId {
signer_id: String,
},
SignerDoesNotExist {
signer_id: AccountId,
},
InvalidNonce {
ak_nonce: u64,
tx_nonce: u64,
},
NonceTooLarge {
tx_nonce: u64,
upper_bound: u64,
},
InvalidReceiverId {
receiver_id: String,
},
InvalidSignature,
NotEnoughBalance {
balance: NearToken,
cost: NearToken,
signer_id: AccountId,
},
LackBalanceForState {
amount: NearToken,
signer_id: AccountId,
},
CostOverflow,
InvalidChain,
Expired,
ActionsValidation(ActionsValidationError),
TransactionSizeExceeded {
limit: u64,
size: u64,
},
InvalidTransactionVersion,
StorageError(StorageError),
ShardCongested {
congestion_level: f64,
shard_id: u32,
},
ShardStuck {
missed_chunks: u64,
shard_id: u32,
},
}Expand description
An error happened during TX execution
JSON schema
{
"description": "An error happened during TX execution",
"oneOf": [
{
"description": "Happens if a wrong AccessKey used or AccessKey has not enough permissions",
"type": "object",
"required": [
"InvalidAccessKeyError"
],
"properties": {
"InvalidAccessKeyError": {
"$ref": "#/components/schemas/InvalidAccessKeyError"
}
},
"additionalProperties": false
},
{
"description": "TX signer_id is not a valid [`AccountId`]",
"type": "object",
"required": [
"InvalidSignerId"
],
"properties": {
"InvalidSignerId": {
"type": "object",
"required": [
"signer_id"
],
"properties": {
"signer_id": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"description": "TX signer_id is not found in a storage",
"type": "object",
"required": [
"SignerDoesNotExist"
],
"properties": {
"SignerDoesNotExist": {
"type": "object",
"required": [
"signer_id"
],
"properties": {
"signer_id": {
"$ref": "#/components/schemas/AccountId"
}
}
}
},
"additionalProperties": false
},
{
"description": "Transaction nonce must be strictly greater than `account[access_key].nonce`.",
"type": "object",
"required": [
"InvalidNonce"
],
"properties": {
"InvalidNonce": {
"type": "object",
"required": [
"ak_nonce",
"tx_nonce"
],
"properties": {
"ak_nonce": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"tx_nonce": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
}
}
},
"additionalProperties": false
},
{
"description": "Transaction nonce is larger than the upper bound given by the block height",
"type": "object",
"required": [
"NonceTooLarge"
],
"properties": {
"NonceTooLarge": {
"type": "object",
"required": [
"tx_nonce",
"upper_bound"
],
"properties": {
"tx_nonce": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"upper_bound": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
}
}
},
"additionalProperties": false
},
{
"description": "TX receiver_id is not a valid AccountId",
"type": "object",
"required": [
"InvalidReceiverId"
],
"properties": {
"InvalidReceiverId": {
"type": "object",
"required": [
"receiver_id"
],
"properties": {
"receiver_id": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"description": "TX signature is not valid",
"type": "string",
"enum": [
"InvalidSignature"
]
},
{
"description": "Account does not have enough balance to cover TX cost",
"type": "object",
"required": [
"NotEnoughBalance"
],
"properties": {
"NotEnoughBalance": {
"type": "object",
"required": [
"balance",
"cost",
"signer_id"
],
"properties": {
"balance": {
"$ref": "#/components/schemas/NearToken"
},
"cost": {
"$ref": "#/components/schemas/NearToken"
},
"signer_id": {
"$ref": "#/components/schemas/AccountId"
}
}
}
},
"additionalProperties": false
},
{
"description": "Signer account doesn't have enough balance after transaction.",
"type": "object",
"required": [
"LackBalanceForState"
],
"properties": {
"LackBalanceForState": {
"type": "object",
"required": [
"amount",
"signer_id"
],
"properties": {
"amount": {
"description": "Required balance to cover the state.",
"allOf": [
{
"$ref": "#/components/schemas/NearToken"
}
]
},
"signer_id": {
"description": "An account which doesn't have enough balance to cover storage.",
"allOf": [
{
"$ref": "#/components/schemas/AccountId"
}
]
}
}
}
},
"additionalProperties": false
},
{
"description": "An integer overflow occurred during transaction cost estimation.",
"type": "string",
"enum": [
"CostOverflow"
]
},
{
"description": "Transaction parent block hash doesn't belong to the current chain",
"type": "string",
"enum": [
"InvalidChain"
]
},
{
"description": "Transaction has expired",
"type": "string",
"enum": [
"Expired"
]
},
{
"description": "An error occurred while validating actions of a Transaction.",
"type": "object",
"required": [
"ActionsValidation"
],
"properties": {
"ActionsValidation": {
"$ref": "#/components/schemas/ActionsValidationError"
}
},
"additionalProperties": false
},
{
"description": "The size of serialized transaction exceeded the limit.",
"type": "object",
"required": [
"TransactionSizeExceeded"
],
"properties": {
"TransactionSizeExceeded": {
"type": "object",
"required": [
"limit",
"size"
],
"properties": {
"limit": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"size": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
}
}
},
"additionalProperties": false
},
{
"description": "Transaction version is invalid.",
"type": "string",
"enum": [
"InvalidTransactionVersion"
]
},
{
"type": "object",
"required": [
"StorageError"
],
"properties": {
"StorageError": {
"$ref": "#/components/schemas/StorageError"
}
},
"additionalProperties": false
},
{
"description": "The receiver shard of the transaction is too congested to accept new\ntransactions at the moment.",
"type": "object",
"required": [
"ShardCongested"
],
"properties": {
"ShardCongested": {
"type": "object",
"required": [
"congestion_level",
"shard_id"
],
"properties": {
"congestion_level": {
"description": "A value between 0 (no congestion) and 1 (max congestion).",
"type": "number",
"format": "double"
},
"shard_id": {
"description": "The congested shard.",
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
}
}
},
"additionalProperties": false
},
{
"description": "The receiver shard of the transaction missed several chunks and rejects\nnew transaction until it can make progress again.",
"type": "object",
"required": [
"ShardStuck"
],
"properties": {
"ShardStuck": {
"type": "object",
"required": [
"missed_chunks",
"shard_id"
],
"properties": {
"missed_chunks": {
"description": "The number of blocks since the last included chunk of the shard.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"shard_id": {
"description": "The shard that fails making progress.",
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
}
}
},
"additionalProperties": false
}
]
}Variants§
InvalidAccessKeyError(InvalidAccessKeyError)
Happens if a wrong AccessKey used or AccessKey has not enough permissions
InvalidSignerId
TX signer_id is not a valid AccountId
SignerDoesNotExist
TX signer_id is not found in a storage
InvalidNonce
Transaction nonce must be strictly greater than account[access_key].nonce.
NonceTooLarge
Transaction nonce is larger than the upper bound given by the block height
InvalidReceiverId
TX receiver_id is not a valid AccountId
InvalidSignature
TX signature is not valid
NotEnoughBalance
Account does not have enough balance to cover TX cost
LackBalanceForState
Signer account doesn’t have enough balance after transaction.
Fields
CostOverflow
An integer overflow occurred during transaction cost estimation.
InvalidChain
Transaction parent block hash doesn’t belong to the current chain
Expired
Transaction has expired
ActionsValidation(ActionsValidationError)
An error occurred while validating actions of a Transaction.
TransactionSizeExceeded
The size of serialized transaction exceeded the limit.
InvalidTransactionVersion
Transaction version is invalid.
StorageError(StorageError)
ShardCongested
The receiver shard of the transaction is too congested to accept new transactions at the moment.
ShardStuck
The receiver shard of the transaction missed several chunks and rejects new transaction until it can make progress again.
Trait Implementations§
Source§impl Clone for InvalidTxError
impl Clone for InvalidTxError
Source§fn clone(&self) -> InvalidTxError
fn clone(&self) -> InvalidTxError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InvalidTxError
impl Debug for InvalidTxError
Source§impl<'de> Deserialize<'de> for InvalidTxError
impl<'de> Deserialize<'de> for InvalidTxError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for InvalidTxError
impl Display for InvalidTxError
Source§impl Error for InvalidTxError
impl Error for InvalidTxError
1.30.0 · 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<&InvalidTxError> for InvalidTxError
impl From<&InvalidTxError> for InvalidTxError
Source§fn from(value: &InvalidTxError) -> Self
fn from(value: &InvalidTxError) -> Self
Source§impl From<ActionsValidationError> for InvalidTxError
impl From<ActionsValidationError> for InvalidTxError
Source§fn from(value: ActionsValidationError) -> Self
fn from(value: ActionsValidationError) -> Self
Source§impl From<InvalidAccessKeyError> for InvalidTxError
impl From<InvalidAccessKeyError> for InvalidTxError
Source§fn from(value: InvalidAccessKeyError) -> Self
fn from(value: InvalidAccessKeyError) -> Self
Source§impl From<InvalidTxError> for TxExecutionError
impl From<InvalidTxError> for TxExecutionError
Source§fn from(value: InvalidTxError) -> Self
fn from(value: InvalidTxError) -> Self
Source§impl From<StorageError> for InvalidTxError
impl From<StorageError> for InvalidTxError
Source§fn from(value: StorageError) -> Self
fn from(value: StorageError) -> Self
Auto Trait Implementations§
impl Freeze for InvalidTxError
impl RefUnwindSafe for InvalidTxError
impl Send for InvalidTxError
impl Sync for InvalidTxError
impl Unpin for InvalidTxError
impl UnwindSafe for InvalidTxError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.