diff --git a/pkg/executor/content/fetcher.go b/pkg/executor/content/fetcher.go index 20e8f7c27a7..7db90ef6d18 100644 --- a/pkg/executor/content/fetcher.go +++ b/pkg/executor/content/fetcher.go @@ -21,6 +21,9 @@ type Fetcher struct { } func (f Fetcher) Fetch(content *testkube.ScriptContent) (path string, err error) { + if content == nil { + return "", fmt.Errorf("fetch - empty content, make sure script content has valid data structure and is not nil") + } switch testkube.ScriptContentType(content.Type_) { case testkube.ScriptContentTypeFileURI: return f.FetchURI(content.Uri)