Skip to content

Commit

Permalink
Merge pull request #26661 from famod/oidc-supplier-null
Browse files Browse the repository at this point in the history
Fix cryptic 'The supplier returned `null`' message if OIDC server connection fails
  • Loading branch information
famod committed Jul 12, 2022
2 parents 4e046f5 + cf2d8e1 commit f547d57
Showing 1 changed file with 5 additions and 1 deletion.
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 f547d57

Please sign in to comment.