Skip to content

Commit

Permalink
fix: Allow Get Universe Without Credentials (#1748)
Browse files Browse the repository at this point in the history
* fix: Allow Get Universe Without Credentials

* chore: Pin `karma`
  • Loading branch information
danielbankhead authored Feb 2, 2024
1 parent ecc6644 commit 696db72
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"karma-firefox-launcher": "^2.0.0",
"karma-mocha": "^2.0.0",
"karma-sourcemap-loader": "^0.4.0",
"karma-webpack": "^5.0.0",
"karma-webpack": "5.0.0",
"keypair": "^1.0.4",
"linkinator": "^4.0.0",
"mocha": "^9.2.2",
Expand Down
7 changes: 6 additions & 1 deletion src/auth/googleauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,12 @@ export class GoogleAuth<T extends AuthClient = JSONClient> {
let universeDomain = originalOrCamelOptions(this.clientOptions).get(
'universe_domain'
);
universeDomain ??= (await this.getClient()).universeDomain;
try {
universeDomain ??= (await this.getClient()).universeDomain;
} catch {
// client or ADC is not available
universeDomain ??= DEFAULT_UNIVERSE;
}

return universeDomain;
}
Expand Down

0 comments on commit 696db72

Please sign in to comment.