diff --git a/pkg/shell-operator/operator.go b/pkg/shell-operator/operator.go index b82ece6f..5b801d03 100644 --- a/pkg/shell-operator/operator.go +++ b/pkg/shell-operator/operator.go @@ -335,6 +335,10 @@ func (op *ShellOperator) conversionEventHandler(crdName string, review *v1.Conve convTask = newTask }) + if convTask == nil { + return nil, fmt.Errorf("no hook found for '%s' event for crd/%s", string(KubernetesConversion), crdName) + } + fmt.Println("TASK", convTask) res := op.taskHandler(convTask)