From b7fd51980330ed8f23269178c31e38d795cdb3e6 Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 13 Dec 2024 09:59:53 +0100 Subject: [PATCH] Return error message to client upon providing incorrect method parameters --- server/src/lib.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/src/lib.rs b/server/src/lib.rs index 44ab11c..09f7b27 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -596,11 +596,7 @@ where Ok(params) => params, Err(e) => { log::error!("{}", e); - return error_response(request.id, || { - RpcError::invalid_params(Some( - "Expected an object for the request parameters.".to_owned(), - )) - }); + return error_response(request.id, || RpcError::invalid_params(Some(e.to_string()))); } };