pub enum SolanaToolError {
Show 14 variants
ToolError(ToolError),
SignerError(SignerError),
Rpc(String),
SolanaClient(Box<ClientError>),
InvalidAddress(String),
InvalidKey(String),
InvalidSignature(String),
Transaction(String),
InsufficientFunds,
InvalidTokenMint(String),
Serialization(Error),
Http(Error),
Core(CoreError),
Generic(String),
}Expand description
Main error type for Solana tool operations.
Variants§
ToolError(ToolError)
Core tool error - passthrough
SignerError(SignerError)
Signer context error - configuration issue
Rpc(String)
RPC client error - network issues are typically retriable Note: May be rate-limited if message contains “429” or “rate limit”
SolanaClient(Box<ClientError>)
Solana client error - classification depends on inner error
InvalidAddress(String)
Invalid address format - user input error
InvalidKey(String)
Invalid key format - user input error
InvalidSignature(String)
Invalid signature format - user input error
Transaction(String)
Transaction failed - may be retriable depending on message
InsufficientFunds
Insufficient funds for operation - permanent error
InvalidTokenMint(String)
Invalid token mint - user input error
Serialization(Error)
Serialization error - data corruption/format issue
Http(Error)
HTTP request error - network issues are typically retriable Note: May be rate-limited if status is 429
Core(CoreError)
Core riglr error - typically retriable
Generic(String)
Generic error - default to retriable
Implementations§
Source§impl SolanaToolError
impl SolanaToolError
Sourcepub fn is_retriable(&self) -> bool
pub fn is_retriable(&self) -> bool
Check if this error is retriable. Note: The IntoToolError macro generates a basic From implementation, but for complex cases that need runtime logic (like checking message content), we keep this method for backward compatibility and to support custom logic.
Sourcepub fn is_rate_limited(&self) -> bool
pub fn is_rate_limited(&self) -> bool
Check if this error is rate-limited.
Sourcepub fn retry_delay(&self) -> Option<Duration>
pub fn retry_delay(&self) -> Option<Duration>
Get appropriate retry delay for rate-limited errors.
Trait Implementations§
Source§impl Debug for SolanaToolError
impl Debug for SolanaToolError
Source§impl Display for SolanaToolError
impl Display for SolanaToolError
Source§impl Error for SolanaToolError
impl Error for SolanaToolError
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
Source§impl From<Error> for SolanaToolError
impl From<Error> for SolanaToolError
Source§fn from(error: ClientError) -> Self
fn from(error: ClientError) -> Self
Source§impl From<CoreError> for SolanaToolError
impl From<CoreError> for SolanaToolError
Source§impl From<Error> for SolanaToolError
impl From<Error> for SolanaToolError
Source§impl From<Error> for SolanaToolError
impl From<Error> for SolanaToolError
Source§impl From<SignerError> for SolanaToolError
impl From<SignerError> for SolanaToolError
Source§fn from(source: SignerError) -> Self
fn from(source: SignerError) -> Self
Source§impl From<SolanaToolError> for ToolError
impl From<SolanaToolError> for ToolError
Source§fn from(err: SolanaToolError) -> Self
fn from(err: SolanaToolError) -> Self
Auto Trait Implementations§
impl Freeze for SolanaToolError
impl !RefUnwindSafe for SolanaToolError
impl Send for SolanaToolError
impl Sync for SolanaToolError
impl Unpin for SolanaToolError
impl !UnwindSafe for SolanaToolError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
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.