pub enum SuiError {
RpcError(String),
ObjectUsed(String),
StateProofFailed(String),
EventProofFailed(String),
CheckpointFailed(String),
TransactionFailed(String),
SerializationError(String),
ConfirmationTimeout {
tx_digest: String,
timeout_ms: u64,
},
ReorgDetected {
checkpoint: u64,
},
NetworkMismatch {
expected: String,
actual: String,
},
CoreError(AdapterError),
}Expand description
Comprehensive error types for the Sui adapter.
Each variant includes context for debugging and recovery guidance.
Variants§
RpcError(String)
Error during RPC communication with Sui node. Recovery: Retry with backoff, switch to fallback RPC endpoint.
ObjectUsed(String)
Seal object has already been consumed. Recovery: This is a fatal error for seal replay attempts. Check object state.
StateProofFailed(String)
State proof verification failed (object existence/ownership). 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§
Trait Implementations§
Source§impl Error for SuiError
impl Error for SuiError
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 SuiError
impl From<AdapterError> for SuiError
Source§fn from(source: AdapterError) -> Self
fn from(source: AdapterError) -> Self
Auto Trait Implementations§
impl Freeze for SuiError
impl RefUnwindSafe for SuiError
impl Send for SuiError
impl Sync for SuiError
impl Unpin for SuiError
impl UnsafeUnpin for SuiError
impl UnwindSafe for SuiError
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.