1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Don't try watching again if credentials have failed (#3039)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-06-14 09:39:06 -04:00 committed by GitHub
parent fa5a54f271
commit 62bc806105
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 8 deletions

View File

@ -20,7 +20,7 @@
*/ */
import orderBy from "lodash/orderBy"; import orderBy from "lodash/orderBy";
import { autoBind, noop } from "./utils"; import { autoBind } from "./utils";
import { action, computed, observable, when, makeObservable } from "mobx"; import { action, computed, observable, when, makeObservable } from "mobx";
export interface ItemObject { export interface ItemObject {
@ -213,11 +213,6 @@ export abstract class ItemStore<T extends ItemObject = ItemObject> {
async removeSelectedItems?(): Promise<any>; async removeSelectedItems?(): Promise<any>;
// eslint-disable-next-line unused-imports/no-unused-vars-ts
subscribe(...args: any[]) {
return noop;
}
* [Symbol.iterator]() { * [Symbol.iterator]() {
yield* this.items; yield* this.items;
} }

View File

@ -345,8 +345,8 @@ export abstract class KubeObjectStore<T extends KubeObject = any> extends ItemSt
if (!this.isLoaded || error instanceof DOMException) return; if (!this.isLoaded || error instanceof DOMException) return;
if (error instanceof Response) { if (error instanceof Response) {
if (error.status === 404) { if (error.status === 404 || error.status === 401) {
// api has gone, let's not retry // api has gone, or credentials are not permitted, let's not retry
return; return;
} }