|
@@ -401,6 +401,11 @@ pub enum ActionErrorKind {
|
401
|
401
|
#[serde(with = "dec_format")]
|
402
|
402
|
minimum_stake: Balance,
|
403
|
403
|
},
|
|
404
|
+ /// An error occurred during a `FunctionCall` Action, parameter is debug message.
|
|
405
|
+ FunctionCallError(near_vm_errors::FunctionCallErrorSer),
|
|
406
|
+ /// Error occurs when a new `ActionReceipt` created by the `FunctionCall` action fails
|
|
407
|
+ /// receipt validation.
|
|
408
|
+ NewReceiptValidationError(ReceiptValidationError),
|
404
|
409
|
/// Error occurs when a `CreateAccount` action is called on hex-characters
|
405
|
410
|
/// account of length 64. See implicit account creation NEP:
|
406
|
411
|
/// <https://github.com/nearprotocol/NEPs/pull/71>.
|
|
@@ -744,6 +749,10 @@ impl Display for ActionErrorKind {
|
744
|
749
|
ActionErrorKind::DeleteAccountStaking { account_id } => {
|
745
|
750
|
write!(f, "Account {:?} is staking and can not be deleted", account_id)
|
746
|
751
|
}
|
|
752
|
+ ActionErrorKind::FunctionCallError(s) => write!(f, "{:?}", s),
|
|
753
|
+ ActionErrorKind::NewReceiptValidationError(e) => {
|
|
754
|
+ write!(f, "An new action receipt created during a FunctionCall is not valid: {}", e)
|
|
755
|
+ }
|
747
|
756
|
ActionErrorKind::InsufficientStake { account_id, stake, minimum_stake } => write!(f, "Account {} tries to stake {} but minimum required stake is {}", account_id, stake, minimum_stake),
|
748
|
757
|
ActionErrorKind::OnlyImplicitAccountCreationAllowed { account_id } => write!(f, "CreateAccount action is called on hex-characters account of length 64 {}", account_id),
|
749
|
758
|
ActionErrorKind::DeleteAccountWithLargeState { account_id } => write!(f, "The state of account {} is too large and therefore cannot be deleted", account_id),
|