Skip to content

Commit

Permalink
Accept missing params in requests
Browse files Browse the repository at this point in the history
As per JSON-RPC spec.
  • Loading branch information
sisou committed Feb 25, 2025
1 parent 5962309 commit 3153a99
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 @@ -755,11 +755,7 @@ where
{
let params = match request.params {
Some(params) => params,
None => {
return error_response(request.id, || {
RpcError::invalid_params(Some("Missing request parameters.".to_owned()))
})
}
None => Value::Array(Vec::new()),
};

let params = match serde_json::from_value(params) {
Expand Down

0 comments on commit 3153a99

Please sign in to comment.