Skip to content

Commit

Permalink
log params at debug if invalid params exception
Browse files Browse the repository at this point in the history
Signed-off-by: Sally MacFarlane <[email protected]>
  • Loading branch information
macfarla committed Dec 20, 2024
1 parent bca3d8c commit 30d193e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.RpcErrorType;
import org.hyperledger.besu.ethereum.privacy.MultiTenancyValidationException;

import java.util.Arrays;

import io.opentelemetry.api.trace.Span;
import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
Expand All @@ -44,7 +46,8 @@ public JsonRpcResponse process(
return method.response(request);
} catch (final InvalidJsonRpcParameters e) {
LOG.debug(
"Invalid Params for method: {}, error: {}",
"Invalid Params {} for method: {}, error: {}",
Arrays.toString(request.getRequest().getParams()),
method.getName(),
e.getRpcErrorType().getMessage(),
e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ public static JsonCallParameter validateAndGetCallParams(final JsonRpcRequestCon
&& (callParams.getMaxFeePerGas().isPresent()
|| callParams.getMaxPriorityFeePerGas().isPresent())) {
try {
LOG.warn(
LOG.debug(
"gasPrice will be ignored since 1559 values are defined (maxFeePerGas or maxPriorityFeePerGas). {}",
Arrays.toString(request.getRequest().getParams()));
} catch (Exception e) {
LOG.warn(
LOG.debug(
"gasPrice will be ignored since 1559 values are defined (maxFeePerGas or maxPriorityFeePerGas)");
}
}
Expand Down

0 comments on commit 30d193e

Please sign in to comment.