Skip to content

Commit

Permalink
Merge pull request #279 from gianlucam76/missing-resource
Browse files Browse the repository at this point in the history
(feat) when referenced resource does not exist, report an error
  • Loading branch information
gianlucam76 authored Nov 18, 2024
2 parents 67049f0 + 778de22 commit 2846400
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ func fetchPolicyRefs(ctx context.Context, c client.Client, e *v1beta1.EventTrigg
if apierrors.IsNotFound(err) {
logger.V(logs.LogInfo).Info(fmt.Sprintf("%s %s/%s does not exist yet",
policyRef.Kind, namespace, referencedName))
continue
return nil, nil, fmt.Errorf("referenced %s %s/%s does not exist",
policyRef.Kind, namespace, string(referencedName))
}
return nil, nil, err
}
Expand Down

0 comments on commit 2846400

Please sign in to comment.