pub trait JsonRpcClientErrorExt {
// Required method
fn as_error_object(&self) -> Option<&ErrorObjectOwned>;
}Available on crate feature
client-api only.Expand description
Helpers to inspect the error type from the client implementation.
This is an extension trait for the following impl:
ⓘ
#[extension(pub trait JsonRpcClientErrorExt)]
impl for JsonRpcClientError
Required Methods§
Sourcefn as_error_object(&self) -> Option<&ErrorObjectOwned>
fn as_error_object(&self) -> Option<&ErrorObjectOwned>
If this is a JSON-RPC error object, return a reference to it.
If submitting a transaction, these are usually pre-execution validity check failures, e.g.,
wrong signatures, equivocated objects, etc. Use ErrorObjectExt to extract more
information from those.
Implementors§
impl JsonRpcClientErrorExt for JsonRpcClientError
Helpers to inspect the error type from the client implementation.