1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Replace error notification with logger error

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2023-02-13 10:41:26 +03:00
parent 95a3d3b144
commit 3192ece80b

View File

@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable";
import customResourceDefinitionStoreInjectable from "../+custom-resources/definition.store.injectable";
import apiManagerInjectable from "../../../common/k8s-api/api-manager/manager.injectable";
import showErrorNotificationInjectable from "../notifications/show-error-notification.injectable";
import loggerInjectable from "../../../common/logger.injectable";
const removeSubnamespaceInjectable = getInjectable({
id: "remove-subnamespace",
@ -13,7 +13,7 @@ const removeSubnamespaceInjectable = getInjectable({
instantiate: (di) => {
const crdStore = di.inject(customResourceDefinitionStoreInjectable);
const apiManager = di.inject(apiManagerInjectable);
const showErrorNotification = di.inject(showErrorNotificationInjectable);
const logger = di.inject(loggerInjectable);
/**
* Removing subnamespace controlled by hierarchical namespace controller by deleting
@ -33,7 +33,7 @@ const removeSubnamespaceInjectable = getInjectable({
const anchor = store?.getByName(subnamespaceName);
if (!anchor) {
showErrorNotification("Error removing namespace: can not find subnamespace anchor.");
logger.error("[REMOVING-SUBNAMESPACE]: Error removing namespace: can not find subnamespace anchor.");
return;
}