diff --git a/package.json b/package.json index eadee9c0..7e4036df 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "dependencies": { "base64-js": "^1.3.0", "ecdsa-sig-formatter": "^1.0.11", - "gaxios": "^6.0.0", + "gaxios": "^6.1.1", "gcp-metadata": "^6.1.0", "gtoken": "^7.0.0", "jws": "^4.0.0" diff --git a/src/auth/googleauth.ts b/src/auth/googleauth.ts index e20ecf47..b5d66c70 100644 --- a/src/auth/googleauth.ts +++ b/src/auth/googleauth.ts @@ -311,7 +311,7 @@ export class GoogleAuth { universeDomain = await gcpMetadata.universe('universe_domain'); universeDomain ||= DEFAULT_UNIVERSE; } catch (e) { - if (e instanceof GaxiosError && e.status === 404) { + if (e && (e as GaxiosError)?.response?.status === 404) { universeDomain = DEFAULT_UNIVERSE; } else { throw e;