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:
Bjørn Erik Pedersen
2022-03-24 08:12:51 +01:00
parent a6fa290f67
commit 9202117ba0
10 changed files with 129 additions and 46 deletions

View File

@@ -133,7 +133,7 @@ func (p *pageState) reusePageOutputContent() bool {
return p.pageOutputTemplateVariationsState.Load() == 1
}
func (p *pageState) Err() error {
func (p *pageState) Err() resource.ResourceError {
return nil
}