Skip to content

Commit 0cef932

Browse files
Merge pull request #630 from mbaldessari/better-err-message
Better webhook error
2 parents 53db08a + fbe41b7 commit 0cef932

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

api/v1alpha1/pattern_webhook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ func (r *PatternValidator) ValidateDelete(_ context.Context, obj runtime.Object)
9191
patternlog.Info("validate delete", "name", p.Name)
9292

9393
if !strings.EqualFold(p.Annotations[PruneAnnotation], "true") {
94-
return nil, fmt.Errorf("deletion denied: set annotation %s=\"true\" on %s/%s before deleting",
95-
PruneAnnotation, p.Namespace, p.Name)
94+
return nil, fmt.Errorf("deletion denied: set the annotation %s=\"true\" on the pattern \"%s\" CR in the \"%s\" namespace before deleting",
95+
PruneAnnotation, p.Name, p.Namespace)
9696
}
9797

9898
return nil, nil

0 commit comments

Comments
 (0)