hyperledger/besu

Improve logging when RPC parameters are missing or empty

jflo opened this issue · 0 comments

jflo commented

Get a bunch of these, not really important but would be better to handle this gracefully (bloomfilter = nil)

org.hyperledger.besu.ethereum.api.jsonrpc.internal.exception.InvalidJsonRpcParameters: Invalid json rpc parameter at index 0
	at org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter.optional(JsonRpcParameter.java:77)
	at org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter.required(JsonRpcParameter.java:42)
	at org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequest.getRequiredParameter(JsonRpcRequest.java:133)
	at org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequestContext.getRequiredParameter(JsonRpcRequestContext.java:64)```

and also

```2022-08-25 21:23:02.473+02:00 | vert.x-eventloop-thread-30 | ERROR | ExecutionEngineJsonRpcMethod | failed to exec consensus method engine_forkchoiceUpdatedV1
org.hyperledger.besu.ethereum.api.jsonrpc.internal.exception.InvalidJsonRpcParameters: Invalid json rpc parameter at index 1
	at org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter.optional(JsonRpcParameter.java:77)
	at org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequest.getOptionalParameter(JsonRpcRequest.java:137)
	at org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequestContext.getOptionalParameter(JsonRpcRequestContext.java:68)```



### Acceptance Criteria
* Logging it more clear and helpful when an RPC call is malformed