pub enum NodeClientError {
Submission {
message: String,
tx_data: Vec<u8>,
source: Option<Box<dyn Error + Send + Sync>>,
},
Connection {
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
TransactionProgress {
message: String,
tx_data: Vec<u8>,
desired_stage: SubmissionStage,
},
Parse {
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
TransactionUsurped {
tx_data: Vec<u8>,
},
TransactionDropped {
tx_data: Vec<u8>,
},
TransactionInvalid {
tx_data: Vec<u8>,
source: Option<Box<dyn Error + Send + Sync>>,
},
}Expand description
Errors produced by the node-client. All terminal transaction statuses
(Usurped/Dropped/Invalid) surface as errors — they end the
submission stream without emitting a terminal event.
Variants§
Submission
The initial submission RPC call failed before the tx entered the pool. Typical cause: the node rejected the extrinsic as not well-formed.
Connection
Could not connect to the node (transport-level failure — WebSocket unreachable, handshake timed out, etc.).
TransactionProgress
The submission stream closed before reaching the requested stage and no other error was reported — the stream ended cleanly but the caller wanted a terminal event it never saw.
Parse
Failed to decode a status or block payload returned by the node. Indicates a wire-format mismatch (usually a runtime upgrade the client hasn’t caught up with).
TransactionUsurped
The transaction was usurped — replaced in the pool by another tx with matching discriminators (same sender+nonce). The node dropped this submission’s watcher; the replacement tx may still succeed.
TransactionDropped
The mempool dropped the transaction — commonly because the pool is full and the network is congested.
TransactionInvalid
The node validated the extrinsic and rejected it as invalid (bad
signature / fails ValidateUnsigned / ledger well-formedness check).
Implementations§
Trait Implementations§
Source§impl Debug for NodeClientError
impl Debug for NodeClientError
Source§impl Display for NodeClientError
impl Display for NodeClientError
Source§impl Error for NodeClientError
impl Error for NodeClientError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for NodeClientError
impl !UnwindSafe for NodeClientError
impl Forget for NodeClientError
impl Freeze for NodeClientError
impl Move for NodeClientError
impl Send for NodeClientError
impl Sync for NodeClientError
impl Unpin for NodeClientError
impl UnsafeUnpin for NodeClientErrorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const dyn Error + Sync + Send is !null: UnsafeUnpin,
PhantomData<dyn Error + Sync + Send>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more