diff --git a/src/renderer/api/kube-api.ts b/src/renderer/api/kube-api.ts index 7350bfc729..fed72e0f2f 100644 --- a/src/renderer/api/kube-api.ts +++ b/src/renderer/api/kube-api.ts @@ -173,13 +173,18 @@ export class KubeApi { */ private async getPreferredVersionPrefixGroup() { if (this.options.fallbackApiBases) { - return this.getLatestApiPrefixGroup(); - } else { - return { - apiPrefix: this.apiPrefix, - apiGroup: this.apiGroup - }; + try { + return await this.getLatestApiPrefixGroup(); + } catch (error) { + // If valid API wasn't found, log the error and return defaults below + console.error(error); + } } + + return { + apiPrefix: this.apiPrefix, + apiGroup: this.apiGroup + }; } protected async checkPreferredVersion() {