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 authored and GitHub committed 2021-06-14 09:39:06 -04:00
1 parent fa5a54f271
commit 62bc806105
2 files changed
+3 -8

No files matched your search

+1 -6
View File
@@ -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;
}
+2 -2
View File
@@ -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;
}