Skip to content

fix(OPENFRAM-004): CU-86aknprf9 runDeleteCluster returns a raw wrapped error instead of the AlreadyHandledError sentinel - #404

Draft
flamingo[bot] wants to merge 1 commit into
mainfrom
ai-fix/openfram-004-80257b87-f7e219df
Draft

flamingo[bot] wants to merge 1 commit into
mainfrom
ai-fix/openfram-004-80257b87-f7e219df

Conversation

@flamingo

@flamingo flamingo Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Closes findings from rule OPENFRAM-004 — runDeleteCluster returns a raw wrapped error instead of the AlreadyHandledError sentinel.

Draft — this is a starting point, not a finished change. The fix required judgment, so read it before trusting it.

# Fix confidence Finding Location
1 🟢 90 high runDeleteCluster returns a raw wrapped error instead of the AlreadyHandledError sentinel cmd/cluster/delete.go:100

What changed — and what was deliberately left — is explained per finding as inline review comments on the lines each finding touched.


Run: https://product-hub.flamingo.so/admin/code-review
Run id: f7e219df-eddc-4e74-8a53-72d2cf9000c3

Merging this PR is recorded as acceptance of the rule that produced it;
closing it unmerged is recorded as rejection. Both feed rule health, so
closing a wrong suggestion is useful rather than merely tidy.

ClickUp task: CU-86aknprf9 OpenFrame CLI code duplication and manager fixes (13 PRs)

@flamingo flamingo Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 What this fix changed, finding by finding

1 finding(s) fixed in this draft — 1 explained inline on the diff.

Comment thread cmd/cluster/delete.go
@@ -100,7 +100,7 @@ func runDeleteCluster(cmd *cobra.Command, args []string) error {
clusterType, err := service.DetectClusterType(clusterName)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 🔴 runDeleteCluster returns a raw wrapped error instead of the AlreadyHandledError sentinel

In runDeleteCluster (cmd/cluster/delete.go), the DetectClusterType error branch now wraps its returned error through sharedErrors.HandleGlobalError(fmt.Errorf(...), globalFlags.Global.Verbose) instead of returning the bare fmt.Errorf-wrapped error, matching the pattern used elsewhere in the same function so main's errors.As sentinel check behaves uniformly and the error isn't printed twice.

🤖 Prompt for AI agents
In cmd/cluster/delete.go around line 100, review and complete this code-review fix: runDeleteCluster returns a raw wrapped error instead of the AlreadyHandledError sentinel.
What the draft fix changed: In runDeleteCluster (cmd/cluster/delete.go), the DetectClusterType error branch now wraps its returned error through sharedErrors.HandleGlobalError(fmt.Errorf(...), globalFlags.Global.Verbose) instead of returning the bare fmt.Errorf-wrapped error, matching the pattern used elsewhere in the same function so main's errors.As sentinel check behaves uniformly and the error isn't printed twice.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟢 90 high — react 👍/👎 to teach the reviewer

@flamingo flamingo Bot changed the title fix(OPENFRAM-004): runDeleteCluster returns a raw wrapped error instead of the AlreadyHandledError sentinel fix(OPENFRAM-004): CU-86aknprf9 runDeleteCluster returns a raw wrapped error instead of the AlreadyHandledError sentinel Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants