Skip to content

Commit cca7797

Browse files
committed
Error on missing PR repo
1 parent 66025c6 commit cca7797

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

common-theme/layouts/partials/block/pullreq.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{{/* This block expects the github pulls api */}}
22
{{ $blockData := .Page.Scratch.Get "blockData" }}
33

4-
{{ with resources.GetRemote $blockData.api $blockData.headers }}
4+
{{ $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 }}
59
{{ with .Err }}
610
{{ errorf "Failed %s on %s. Error: %s" $blockData.api .Page.Title . }}
711
{{ end }}

0 commit comments

Comments
 (0)