fix: show error notification when cluster deletion fails#5001
fix: show error notification when cluster deletion fails#5001XxSURYANSHxX wants to merge 2 commits intokubernetes-sigs:mainfrom
Conversation
Previously, errors from deleteCluster() were silently swallowed and the user was redirected to home with no feedback. This resolves the TODO comments in ClusterContextMenu and SettingsCluster by dispatching an error notification via the existing Redux notification system. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: XxSURYANSHxX The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @XxSURYANSHxX! |
One or more co-authors of this pull request were not found. You must specify co-authors in commit message trailer via: Supported
Alternatively, if the co-author should not be included, remove the Please update your commit message(s) by doing |
Summary
@illume @joaquimrocha This PR fixes a bug where errors from
deleteCluster()were silently swallowed and the user was redirected to home with no feedback. This resolves the TODO comments inClusterContextMenuandSettingsClusterby dispatching an error notification via the existing Redux notification system.Related Issue
Fixes #4928
Changes
frontend/src/components/App/Home/ClusterContextMenu.tsxto dispatch an error notification when cluster deletion failsfrontend/src/components/App/Settings/SettingsCluster.tsxwith the same error notification fix// TODO: create notification with error messagecomments in both filesSteps to Test
/Screenshots (if applicable)
Before: user is silently redirected to home with no feedback.
After: an error notification appears in the notification bell with the cluster name and error message.
Notes for the Reviewer
deleteCluster(), not justNot Found, which is a superset of what the original TODO described as this is intentional since any failure should be surfaced to the user.t()function, so please check translation key consistency if needed.Notificationclass andsetNotificationsRedux action already in the codebase.