From 1f2f715608cc60c3c54c89006eadba95924dacb8 Mon Sep 17 00:00:00 2001 From: courtneyeh Date: Mon, 4 Sep 2023 17:04:29 +1200 Subject: [PATCH] Update fork choice error message when unable to connect to execution client --- .../teku/statetransition/forkchoice/ForkChoice.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/forkchoice/ForkChoice.java b/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/forkchoice/ForkChoice.java index b6aa3765ae6..be4ac0d7bc7 100644 --- a/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/forkchoice/ForkChoice.java +++ b/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/forkchoice/ForkChoice.java @@ -176,7 +176,18 @@ public void onForkChoiceUpdatedResult( .getHeadBlockRoot(), forkChoiceUpdatedResult.getPayloadStatus()); })) - .finish(error -> LOG.error("Failed to update fork choice", error)); + .finish( + error -> { + final String errorMessage = "Failed to update fork choice. "; + if (error + .getMessage() + .contains( + "Invalid remote response from the execution client: Failed to connect to ")) { + LOG.error(errorMessage + error.getMessage()); + } else { + LOG.error(errorMessage, error); + } + }); } public SafeFuture processHead() {