mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 22:47:56 +00:00
Make wildcard storage change subscriptions RPC-unsafe (#11259)
* When an RPC is rejected because it's RPC-unsafe say why in the error message * Make wildcard storage change subscriptions RPC-unsafe * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Fix typo * Fix tests Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -56,7 +56,7 @@ impl std::fmt::Display for UnsafeRpcError {
|
||||
impl std::error::Error for UnsafeRpcError {}
|
||||
|
||||
impl From<UnsafeRpcError> for rpc::Error {
|
||||
fn from(_: UnsafeRpcError) -> rpc::Error {
|
||||
rpc::Error::method_not_found()
|
||||
fn from(error: UnsafeRpcError) -> rpc::Error {
|
||||
rpc::Error { code: rpc::ErrorCode::MethodNotFound, message: error.to_string(), data: None }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user