mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Notify user if Helm list fails (#2262)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
0e307e65b6
commit
eec0644667
@ -70,7 +70,7 @@ class HelmApiRoute extends LensApi {
|
|||||||
this.respondJson(response, result);
|
this.respondJson(response, result);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.debug(error);
|
logger.debug(error);
|
||||||
this.respondText(response, error);
|
this.respondText(response, error, 422);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ class HelmApiRoute extends LensApi {
|
|||||||
this.respondJson(response, result);
|
this.respondJson(response, result);
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
logger.debug(error);
|
logger.debug(error);
|
||||||
this.respondText(response, error);
|
this.respondText(response, error, 422);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import { ItemStore } from "../../item.store";
|
|||||||
import { Secret } from "../../api/endpoints";
|
import { Secret } from "../../api/endpoints";
|
||||||
import { secretsStore } from "../+config-secrets/secrets.store";
|
import { secretsStore } from "../+config-secrets/secrets.store";
|
||||||
import { namespaceStore } from "../+namespaces/namespace.store";
|
import { namespaceStore } from "../+namespaces/namespace.store";
|
||||||
|
import { Notifications } from "../notifications";
|
||||||
|
|
||||||
@autobind()
|
@autobind()
|
||||||
export class ReleaseStore extends ItemStore<HelmRelease> {
|
export class ReleaseStore extends ItemStore<HelmRelease> {
|
||||||
@ -67,7 +68,11 @@ export class ReleaseStore extends ItemStore<HelmRelease> {
|
|||||||
this.items.replace(this.sortItems(items));
|
this.items.replace(this.sortItems(items));
|
||||||
this.isLoaded = true;
|
this.isLoaded = true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`Loading Helm Chart releases has failed: ${error}`);
|
console.error("Loading Helm Chart releases has failed", error);
|
||||||
|
|
||||||
|
if (error.error) {
|
||||||
|
Notifications.error(error.error);
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user