From 90b95b29fc7b4beb694728832a41a9765fcf3be5 Mon Sep 17 00:00:00 2001 From: Aman-Cool Date: Sun, 1 Feb 2026 14:50:41 +0530 Subject: [PATCH] fix: return error when resume reconciliation fails Signed-off-by: Aman-Cool --- cmd/flux/resume.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cmd/flux/resume.go b/cmd/flux/resume.go index fe23a411..e531ecee 100644 --- a/cmd/flux/resume.go +++ b/cmd/flux/resume.go @@ -126,6 +126,17 @@ func (resume resumeCommand) run(cmd *cobra.Command, args []string) error { resume.printMessage(reconcileResps) + // Return an error if any reconciliation failed + var failedCount int + for _, r := range reconcileResps { + if r.resumable != nil && r.err != nil { + failedCount++ + } + } + if failedCount > 0 { + return fmt.Errorf("reconciliation failed for %d %s(s)", failedCount, resume.kind) + } + return nil }