File size: 625 Bytes
251a574
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/build/src/index.js b/build/src/index.js
--- a/build/src/index.js
+++ b/build/src/index.js
@@ -323,6 +323,10 @@ async function isAvailable() {
         if (process.env.DEBUG_AUTH) {
             console.info(err);
         }
+        // Promise.any() rejects with AggregateError when neither metadata host
+        // is available. This is expected outside GCP, not a warning condition.
+        if (err instanceof AggregateError)
+            return false;
         if (err.type === 'request-timeout') {
             // If running in a GCP environment, metadata endpoint should return
             // within ms.