Skip to content

Commit 81890df

Browse files
committed
fix(mtls): Address code-review comments.
1 parent a74dd57 commit 81890df

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,9 @@ public InstantiatingGrpcChannelProvider build() {
13001300
LOG.log(
13011301
Level.WARNING,
13021302
"DefaultMtlsProviderFactory encountered unexpected IOException: " + e.getMessage());
1303+
LOG.log(
1304+
Level.WARNING,
1305+
"mTLS configuration was detected on the device, but mTLS failed to initialize. Falling back to non-mTLS channel.");
13031306
}
13041307
}
13051308
}

gax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/InstantiatingHttpJsonChannelProvider.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,9 @@ public InstantiatingHttpJsonChannelProvider build() {
356356
LOG.log(
357357
Level.WARNING,
358358
"DefaultMtlsProviderFactory encountered unexpected IOException: " + e.getMessage());
359+
LOG.log(
360+
Level.WARNING,
361+
"mTLS configuration was detected on the device, but mTLS failed to initialize. Falling back to non-mTLS channel.");
359362
}
360363
}
361364
}

gax-java/gax/src/main/java/com/google/api/gax/rpc/EndpointContext.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,9 @@ private String determineEndpoint() throws IOException {
304304
LOG.log(
305305
Level.WARNING,
306306
"DefaultMtlsProviderFactory encountered unexpected IOException: " + e.getMessage());
307+
LOG.log(
308+
Level.WARNING,
309+
"mTLS configuration was detected on the device, but mTLS failed to initialize. Falling back to non-mTLS channel.");
307310
}
308311
}
309312
}

0 commit comments

Comments
 (0)