diff --git a/extensions/oidc-client/runtime/src/main/java/io/quarkus/oidc/client/runtime/OidcClientImpl.java b/extensions/oidc-client/runtime/src/main/java/io/quarkus/oidc/client/runtime/OidcClientImpl.java index 06a59c1f543da..bbb62b55b0c00 100644 --- a/extensions/oidc-client/runtime/src/main/java/io/quarkus/oidc/client/runtime/OidcClientImpl.java +++ b/extensions/oidc-client/runtime/src/main/java/io/quarkus/oidc/client/runtime/OidcClientImpl.java @@ -122,7 +122,11 @@ public Uni 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)); }