pub enum Error {
Show 13 variants
NetworkError(Error),
HttpError(u16, String),
DeserializationError(String),
GenericRpcError(i32, String, Option<Value>),
UnknownError(String),
UnsupportedTir(UnsupportedTirDiagnostic),
InvalidTirEnvelope,
InvalidTirBytes,
UnsupportedTxEra,
UnsupportedEra {
era: String,
},
MissingTxArg(MissingTxArgDiagnostic),
InputNotResolved(Box<InputNotResolvedDiagnostic>),
TxScriptFailure(TxScriptFailureDiagnostic),
}Expand description
Error type for TRP client operations.
This enum represents all possible errors that can occur when interacting with the TRP protocol, including network errors, HTTP errors, deserialization errors, and specific TRP protocol errors.
Variants§
NetworkError(Error)
Network error from the underlying HTTP client.
HttpError(u16, String)
HTTP error with status code and message.
DeserializationError(String)
Failed to deserialize the response from the server.
GenericRpcError(i32, String, Option<Value>)
Generic JSON-RPC error with code, message, and optional data.
UnknownError(String)
Unknown error with a message.
UnsupportedTir(UnsupportedTirDiagnostic)
The TIR version provided is not supported by the server.
Contains the expected and provided version information.
InvalidTirEnvelope
The TIR envelope format is invalid.
InvalidTirBytes
Failed to decode the intermediate representation bytes.
UnsupportedTxEra
Only transactions from the Conway era are supported.
UnsupportedEra
The node cannot resolve transactions while running at the specified era.
MissingTxArg(MissingTxArgDiagnostic)
A required transaction argument is missing.
Contains the name and expected type of the missing argument.
InputNotResolved(Box<InputNotResolvedDiagnostic>)
An input could not be resolved during transaction construction.
Contains diagnostic information about the failed query.
TxScriptFailure(TxScriptFailureDiagnostic)
The transaction script execution failed.
Contains log output from the failed script.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
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.