Skip to content

Commit 696db72

Browse files
authored
fix: Allow Get Universe Without Credentials (#1748)
* fix: Allow Get Universe Without Credentials * chore: Pin `karma`
1 parent ecc6644 commit 696db72

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"karma-firefox-launcher": "^2.0.0",
4848
"karma-mocha": "^2.0.0",
4949
"karma-sourcemap-loader": "^0.4.0",
50-
"karma-webpack": "^5.0.0",
50+
"karma-webpack": "5.0.0",
5151
"keypair": "^1.0.4",
5252
"linkinator": "^4.0.0",
5353
"mocha": "^9.2.2",

src/auth/googleauth.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,12 @@ export class GoogleAuth<T extends AuthClient = JSONClient> {
343343
let universeDomain = originalOrCamelOptions(this.clientOptions).get(
344344
'universe_domain'
345345
);
346-
universeDomain ??= (await this.getClient()).universeDomain;
346+
try {
347+
universeDomain ??= (await this.getClient()).universeDomain;
348+
} catch {
349+
// client or ADC is not available
350+
universeDomain ??= DEFAULT_UNIVERSE;
351+
}
347352

348353
return universeDomain;
349354
}

0 commit comments

Comments
 (0)