We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66025c6 commit cca7797Copy full SHA for cca7797
common-theme/layouts/partials/block/pullreq.html
@@ -1,7 +1,11 @@
1
{{/* This block expects the github pulls api */}}
2
{{ $blockData := .Page.Scratch.Get "blockData" }}
3
4
-{{ with resources.GetRemote $blockData.api $blockData.headers }}
+{{ $response := resources.GetRemote $blockData.api $blockData.headers }}
5
+{{ if eq $response nil }}
6
+ {{ errorf "No response fetching %s" $blockData.api }}
7
+{{ end }}
8
+{{ with $response }}
9
{{ with .Err }}
10
{{ errorf "Failed %s on %s. Error: %s" $blockData.api .Page.Title . }}
11
{{ end }}
0 commit comments