pub enum SwapExecutionError {
Domain(SwapExecutionErrorCode),
Quote(SwapQuoteError),
Upstream(ErpcError),
}Expand description
Errors produced by unsigned EVM swap preparation and simulation.
Quote-domain failures remain available through Self::Quote, while
transport, timeout, cancellation, and non-revert JSON-RPC failures retain
their sanitized SDK error through Self::Upstream.
Variants§
Domain(SwapExecutionErrorCode)
A deterministic execution-domain failure.
Quote(SwapQuoteError)
A quote-domain failure that occurred before router execution reads.
Upstream(ErpcError)
An existing transport, timeout, cancellation, or JSON-RPC error.
Implementations§
Source§impl SwapExecutionError
impl SwapExecutionError
Sourcepub const fn code(&self) -> Option<SwapExecutionErrorCode>
pub const fn code(&self) -> Option<SwapExecutionErrorCode>
Returns the execution-domain code, or None for a quote or upstream error.
Sourcepub const fn quote(&self) -> Option<&SwapQuoteError>
pub const fn quote(&self) -> Option<&SwapQuoteError>
Returns the nested quote error when quote validation failed.
Sourcepub const fn upstream(&self) -> Option<&ErpcError>
pub const fn upstream(&self) -> Option<&ErpcError>
Returns the preserved upstream error when transport failed.
Sourcepub const fn code_string(&self) -> Option<&'static str>
pub const fn code_string(&self) -> Option<&'static str>
Returns the stable code string for either execution or quote errors.
Sourcepub const fn quote_code(&self) -> Option<SwapQuoteErrorCode>
pub const fn quote_code(&self) -> Option<SwapQuoteErrorCode>
Returns the nested quote-domain code when one is present.
Trait Implementations§
Source§impl Debug for SwapExecutionError
impl Debug for SwapExecutionError
Source§impl Display for SwapExecutionError
impl Display for SwapExecutionError
Source§impl Error for SwapExecutionError
impl Error for SwapExecutionError
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()