diff --git a/pallets/gear/rpc/src/lib.rs b/pallets/gear/rpc/src/lib.rs index c897224b3be..e27d5144e76 100644 --- a/pallets/gear/rpc/src/lib.rs +++ b/pallets/gear/rpc/src/lib.rs @@ -178,7 +178,7 @@ where self.client .runtime_api() .api_version::>(at_hash) - .map_err(|e| map_err(e, "Failed to get gear runtime api version"))? + .map_err(|e| into_call_err(e, "Failed to get gear runtime api version"))? .ok_or_else(|| { CallError::Custom(ErrorObject::owned( 8000, @@ -245,7 +245,7 @@ impl From for i64 { } } -fn map_err(error: impl ToString, desc: &'static str) -> CallError { +fn into_call_err(error: impl ToString, desc: &'static str) -> CallError { CallError::Custom(ErrorObject::owned(8000, desc, Some(error.to_string()))) }