mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-24 07:51:07 +00:00
error: RpcError with custom client error (#694)
* error: `RpcError` with custom client error Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * error: Add `SubscriptionDropped` and panic on param errors Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Update subxt/src/rpc/rpc_client_t.rs Co-authored-by: James Wilson <james@jsdw.me> * Apply rustfmt Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: James Wilson <james@jsdw.me>
This commit is contained in:
@@ -74,7 +74,7 @@ impl<T: Config> OnlineClient<T> {
|
||||
pub async fn from_url(url: impl AsRef<str>) -> Result<OnlineClient<T>, Error> {
|
||||
let client = jsonrpsee_helpers::ws_client(url.as_ref())
|
||||
.await
|
||||
.map_err(|e| crate::error::RpcError(e.to_string()))?;
|
||||
.map_err(|e| crate::error::RpcError::ClientError(Box::new(e)))?;
|
||||
OnlineClient::from_rpc_client(Arc::new(client)).await
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user