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:
parent
fa5a54f271
commit
62bc806105
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
import orderBy from "lodash/orderBy";
|
||||
import { autoBind, noop } from "./utils";
|
||||
import { autoBind } from "./utils";
|
||||
import { action, computed, observable, when, makeObservable } from "mobx";
|
||||
|
||||
export interface ItemObject {
|
||||
@ -213,11 +213,6 @@ export abstract class ItemStore<T extends ItemObject = ItemObject> {
|
||||
|
||||
async removeSelectedItems?(): Promise<any>;
|
||||
|
||||
// eslint-disable-next-line unused-imports/no-unused-vars-ts
|
||||
subscribe(...args: any[]) {
|
||||
return noop;
|
||||
}
|
||||
|
||||
* [Symbol.iterator]() {
|
||||
yield* this.items;
|
||||
}
|
||||
|
||||
@ -345,8 +345,8 @@ export abstract class KubeObjectStore<T extends KubeObject = any> extends ItemSt
|
||||
if (!this.isLoaded || error instanceof DOMException) return;
|
||||
|
||||
if (error instanceof Response) {
|
||||
if (error.status === 404) {
|
||||
// api has gone, let's not retry
|
||||
if (error.status === 404 || error.status === 401) {
|
||||
// api has gone, or credentials are not permitted, let's not retry
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user