Skip to content

Commit

Permalink
Return error message to client upon providing incorrect method parame…
Browse files Browse the repository at this point in the history
…ters
  • Loading branch information
Eligioo authored and hrxi committed Dec 16, 2024
1 parent 18e779f commit b7fd519
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())));
}
};

Expand Down

0 comments on commit b7fd519

Please sign in to comment.