Skip to content

Commit

Permalink
improve error messages again
Browse files Browse the repository at this point in the history
  • Loading branch information
tbenr committed Jan 31, 2022
1 parent 2a5b309 commit f766d66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,16 @@ public SafeFuture<Optional<ProposerConfig>> 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));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit f766d66

Please sign in to comment.