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
d81774af0d
commit
64ebfc25ae
@ -70,7 +70,7 @@ class HelmApiRoute extends LensApi {
|
||||
this.respondJson(response, result);
|
||||
} catch (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);
|
||||
} catch(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 { secretsStore } from "../+config-secrets/secrets.store";
|
||||
import { namespaceStore } from "../+namespaces/namespace.store";
|
||||
import { Notifications } from "../notifications";
|
||||
|
||||
@autobind()
|
||||
export class ReleaseStore extends ItemStore<HelmRelease> {
|
||||
@ -67,7 +68,11 @@ export class ReleaseStore extends ItemStore<HelmRelease> {
|
||||
this.items.replace(this.sortItems(items));
|
||||
this.isLoaded = true;
|
||||
} 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 {
|
||||
this.isLoading = false;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user