mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +02:00
resources: Add more details to .Err
This commit adds a .Data object (a map with `Body`, `StatusCode` etc.) to the .Err returned from `resources.GetRemote`, which means you can now do:
```
{{ with .Err }}
{{ range $k, $v := .Data }}
{{ end }}
{{ end }}
```
Fixes #9708
This commit is contained in:
@@ -167,7 +167,7 @@ func (r *resourceAdapter) Content() (any, error) {
|
||||
return r.target.Content()
|
||||
}
|
||||
|
||||
func (r *resourceAdapter) Err() error {
|
||||
func (r *resourceAdapter) Err() resource.ResourceError {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user