Skip to content

Commit

Permalink
Fix cryptic 'The supplier returned null' message if OIDC server con…
Browse files Browse the repository at this point in the history
…nection fails

(cherry picked from commit cf2d8e1)
  • Loading branch information
famod authored and gsmet committed Jul 18, 2022
1 parent 6926825 commit 8a3af09
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ public Uni<Tokens> get() {
.onFailure(ConnectException.class)
.retry()
.atMost(oidcConfig.connectionRetryCount)
.onFailure().transform(t -> t.getCause());
.onFailure().transform(t -> {
LOG.warn("OIDC Server is not available:", t.getCause() != null ? t.getCause() : t);
// don't wrap t to avoid information leak
return new OidcClientException("OIDC Server is not available");
});
return response.onItem()
.transform(resp -> emitGrantTokens(resp, refresh));
}
Expand Down

0 comments on commit 8a3af09

Please sign in to comment.