Skip to content

Commit

Permalink
Fixed Error Handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Dharmjit Singh committed Oct 18, 2023
1 parent 2d93a29 commit 252d087
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions agent/reconciler/host_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,11 @@ func (r *HostReconciler) cleank8sdirectories(ctx context.Context) error {
}

if len(errList) > 0 {
errs := errList[0] //nolint: gosec
for i, err := range errList[1:] { //nolint: gosec
errs = fmt.Errorf("%w; %d error", err, i)
err := errList[0] //nolint: gosec
for _, e := range errList[1:] { //nolint: gosec
err = fmt.Errorf("%w; %v error", err, e)
}
return errors.WithMessage(errs, "not all k8s directories are cleaned up")
return errors.WithMessage(err, "not all k8s directories are cleaned up")
}
return nil
}
Expand Down

0 comments on commit 252d087

Please sign in to comment.