diff --git a/content/en/functions/go-template/try.md b/content/en/functions/go-template/try.md index be2101625..997757a83 100644 --- a/content/en/functions/go-template/try.md +++ b/content/en/functions/go-template/try.md @@ -104,6 +104,9 @@ Instead of failing the build, we can catch the error and emit a warning: {{ end }} {{ end }} ``` +In the above, note that the [context](/getting-started/glossary/#context) within the last conditional block is the `TryValue` object returned by the `try` statement. At this point neither the `Err` nor `Value` methods returned anything, so the current context is not useful. Use the `$` to access the [template context] if needed. + +[template context]: /templates/introduction/#template-context {{% note %}} Hugo does not classify an HTTP response with status code 404 as an error. In this case `resources.GetRemote` returns nil.