From efbee0bff868f1d184ad23061447ceec9fdc9f6d Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sat, 28 Sep 2024 16:07:58 -0700 Subject: [PATCH] Clarify resources.GetRemote 404 handling --- content/en/functions/resources/GetRemote.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/en/functions/resources/GetRemote.md b/content/en/functions/resources/GetRemote.md index 556bfbeca..2179415dd 100644 --- a/content/en/functions/resources/GetRemote.md +++ b/content/en/functions/resources/GetRemote.md @@ -102,6 +102,10 @@ The [`Err`] method on a resource returned by the `resources.GetRemote` function [`Err`]: /methods/resource/err/ +{{% note %}} +Hugo does not classify an HTTP response with status code 404 as an error. In this case the function returns nil. +{{% /note %}} + ```go-html-template {{ $url := "https://broken-example.org/images/a.jpg" }} {{ with resources.GetRemote $url }}