pub enum AptosError {
RpcError(String),
ResourceUsed(String),
StateProofFailed(String),
EventProofFailed(String),
CheckpointFailed(String),
TransactionFailed(String),
SerializationError(String),
ConfirmationTimeout {
tx_hash: String,
timeout_ms: u64,
},
ReorgDetected {
version: u64,
},
NetworkMismatch {
expected: u64,
actual: u64,
},
CoreError(AdapterError),
}Expand description
Comprehensive error types for the Aptos adapter.
Each variant includes context for debugging and recovery guidance.
Variants§
RpcError(String)
Error during RPC communication with Aptos node. Recovery: Retry with backoff, switch to fallback RPC endpoint.
ResourceUsed(String)
Seal resource has already been consumed. Recovery: This is a fatal error for seal replay attempts. Check seal state.
StateProofFailed(String)
State proof verification failed (Merkle proof against accumulator root). Recovery: Re-fetch proof from different RPC endpoint, check for reorg.
EventProofFailed(String)
Event proof verification failed (event emission verification). Recovery: Re-verify transaction, check event index and data.
CheckpointFailed(String)
Checkpoint certification verification failed. Recovery: Check validator signatures, verify epoch boundaries.
TransactionFailed(String)
Transaction submission or execution failed. Recovery: Check transaction simulation error, adjust gas parameters.
SerializationError(String)
Error during serialization/deserialization. Recovery: This is a programming error. Check data format compatibility.
ConfirmationTimeout
Timeout while waiting for transaction confirmation. Recovery: Resubmit transaction with higher gas, check mempool status.
ReorgDetected
Chain reorg detected affecting anchor validity. Recovery: Re-publish commitment at new chain tip.
NetworkMismatch
Network mismatch (e.g., mainnet seal on testnet). Recovery: Ensure network configuration matches chain ID.
CoreError(AdapterError)
Core adapter error from csv-adapter-core.
Implementations§
Source§impl AptosError
impl AptosError
Trait Implementations§
Source§impl Debug for AptosError
impl Debug for AptosError
Source§impl Display for AptosError
impl Display for AptosError
Source§impl Error for AptosError
impl Error for AptosError
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()
Source§impl From<AdapterError> for AptosError
impl From<AdapterError> for AptosError
Source§fn from(source: AdapterError) -> Self
fn from(source: AdapterError) -> Self
Source§impl From<AptosError> for AdapterError
impl From<AptosError> for AdapterError
Source§fn from(err: AptosError) -> Self
fn from(err: AptosError) -> Self
Auto Trait Implementations§
impl Freeze for AptosError
impl RefUnwindSafe for AptosError
impl Send for AptosError
impl Sync for AptosError
impl Unpin for AptosError
impl UnsafeUnpin for AptosError
impl UnwindSafe for AptosError
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> 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.