We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fff1555 commit 4b5b0b5Copy full SHA for 4b5b0b5
auth/src/test/java/com/google/cloud/auth/samples/AuthExampleIT.java
@@ -21,6 +21,7 @@
21
22
import com.google.api.apikeys.v2.Key;
23
import com.google.cloud.ServiceOptions;
24
+import io.grpc.StatusRuntimeException;
25
import java.io.ByteArrayOutputStream;
26
import java.io.IOException;
27
import java.io.PrintStream;
@@ -90,7 +91,7 @@ static String authenticateUsingApiKeyWithRetry(String apiKey) throws IOException
90
91
for (int i = 0; i < retries; i++) {
92
try {
93
return ApiKeyAuthExample.authenticateUsingApiKey(apiKey);
- } catch (IOException e) {
94
+ } catch (StatusRuntimeException e) {
95
if (e.getMessage().contains("API key expired")) {
96
System.out.println("API key not yet active, retrying...");
97
0 commit comments