Skip to content

Commit 3a16269

Browse files
Merge pull request #203 from vbnrh/fix-function
Return not found error
2 parents 300b7d0 + fe6299c commit 3a16269

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/drpolicy_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (r *DRPolicyReconciler) getMirrorPeerForClusterSet(ctx context.Context, clu
7373
}
7474

7575
klog.Info("could not find any mirrorpeer for drpolicy")
76-
return nil, nil
76+
return nil, k8serrors.NewNotFound(schema.GroupResource{Group: multiclusterv1alpha1.GroupVersion.Group, Resource: "MirrorPeer"}, fmt.Sprintf("ClusterSet-%s-%s", clusterSet[0], clusterSet[1]))
7777
}
7878
func (r *DRPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
7979
klog.Infof("running DRPolicy reconciler on hub cluster")

0 commit comments

Comments
 (0)