Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down