diff --git a/src/components/Cluster/ClusterDetail/AppDetailsModal/AppDetailsModal.tsx b/src/components/Cluster/ClusterDetail/AppDetailsModal/AppDetailsModal.tsx index 783fac78e4..7715c3421c 100644 --- a/src/components/Cluster/ClusterDetail/AppDetailsModal/AppDetailsModal.tsx +++ b/src/components/Cluster/ClusterDetail/AppDetailsModal/AppDetailsModal.tsx @@ -110,30 +110,52 @@ const AppDetailsModal: React.FC< async function deleteAppConfig() { try { await dispatch(deleteAppConfigAction(appName, clusterId)); + } catch (err) { + // Keep going; the thunk action does its own user-facing error handling. + ErrorReporter.getInstance().notify(err as Error); + } + + try { await dispatch(loadClusterApps({ clusterId: clusterId })); - handleClose(); } catch (err) { + // Don't keep the modal stuck open just because refreshing failed. ErrorReporter.getInstance().notify(err as Error); + } finally { + handleClose(); } } async function deleteAppSecret() { try { await dispatch(deleteAppSecretAction(appName, clusterId)); + } catch (err) { + // Keep going; the thunk action does its own user-facing error handling. + ErrorReporter.getInstance().notify(err as Error); + } + + try { await dispatch(loadClusterApps({ clusterId: clusterId })); - handleClose(); } catch (err) { + // Don't keep the modal stuck open just because refreshing failed. ErrorReporter.getInstance().notify(err as Error); + } finally { + handleClose(); } } async function deleteApp() { try { await dispatch(deleteAppAction({ appName, clusterId })); + } catch (err) { + ErrorReporter.getInstance().notify(err as Error); + } + + try { await dispatch(loadClusterApps({ clusterId: clusterId })); - handleClose(); } catch (err) { ErrorReporter.getInstance().notify(err as Error); + } finally { + handleClose(); } }