ERROR Rebuild failed: process: ".../data-test/content/data/_content.gotmpl:14:15" at <$data.features>: can’t evaluate field features in type string
I was investigating this error until I realised the remote data file was missing (404 error). Shouldn’t the error have been detected in the code block fetching the data about the missing file, rather than when trying to process its contents?
We have had that discussion before, and we landed on the decision that we don’t treat 404 (not found) as an error, but as a “no result”, so it makes these 2 logically the same:
{{ with resources.GetRemote "https://gohugo.io/foo-bar" }}{{ . }}{{ end }}
{{ with resources.Get "not-found" }}{{ . }}{{ end }}
You can certainly treat it as an error yourself:
{{ with resources.GetRemote "https://gohugo.io/foo-bar" }}{{ . }}{{{ else }}{{ errorf "Not found!" }}{ end }}