From f766d664b285199cf02219ab8c1d26e743512cbe Mon Sep 17 00:00:00 2001 From: Enrico Del Fante Date: Thu, 27 Jan 2022 19:59:46 +0100 Subject: [PATCH] improve error messages again --- .../proposerconfig/AbstractProposerConfigProvider.java | 5 ++++- .../client/proposerconfig/loader/ProposerConfigLoader.java | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/validator/client/src/main/java/tech/pegasys/teku/validator/client/proposerconfig/AbstractProposerConfigProvider.java b/validator/client/src/main/java/tech/pegasys/teku/validator/client/proposerconfig/AbstractProposerConfigProvider.java index fc292666d45..fff3663aca7 100644 --- a/validator/client/src/main/java/tech/pegasys/teku/validator/client/proposerconfig/AbstractProposerConfigProvider.java +++ b/validator/client/src/main/java/tech/pegasys/teku/validator/client/proposerconfig/AbstractProposerConfigProvider.java @@ -67,13 +67,16 @@ public SafeFuture> getProposerConfig() { .exceptionally( throwable -> { if (lastProposerConfig.isPresent()) { - LOG.warn("An error occurred while obtaining config, providing last loaded config"); + LOG.warn( + "An error occurred while obtaining config, providing last loaded config", + throwable); return lastProposerConfig; } throw new RuntimeException( "An error occurred while obtaining config and there is no previously loaded config", throwable); }) + .thenPeek(__ -> LOG.info("proposer config successfully loaded")) .alwaysRun(() -> requestInProgress.set(false)); } diff --git a/validator/client/src/main/java/tech/pegasys/teku/validator/client/proposerconfig/loader/ProposerConfigLoader.java b/validator/client/src/main/java/tech/pegasys/teku/validator/client/proposerconfig/loader/ProposerConfigLoader.java index 291be3dba0b..b50b460c286 100644 --- a/validator/client/src/main/java/tech/pegasys/teku/validator/client/proposerconfig/loader/ProposerConfigLoader.java +++ b/validator/client/src/main/java/tech/pegasys/teku/validator/client/proposerconfig/loader/ProposerConfigLoader.java @@ -48,7 +48,7 @@ public ProposerConfig getProposerConfig(final URL source) { } catch (IOException ex) { throw new InvalidConfigurationException( - "Failed to load proposer config from URL:" + "Failed to load proposer config from URL: " + UrlSanitizer.sanitizePotentialUrl(source.toString()), ex); }