mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Catch exceptions when trying to load namespaces from api (#3084)
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
parent
54eaaefe62
commit
3206e7d7fd
@ -112,7 +112,7 @@ export class NamespaceStore extends KubeObjectStore<Namespace> {
|
||||
protected async loadItems(params: KubeObjectStoreLoadingParams) {
|
||||
const { allowedNamespaces } = this;
|
||||
|
||||
let namespaces = (await super.loadItems(params)) || [];
|
||||
let namespaces = await super.loadItems(params).catch(() => []);
|
||||
|
||||
namespaces = namespaces.filter(namespace => allowedNamespaces.includes(namespace.getName()));
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user