Repository: gohugoio/hugo (language: go)

Issue:
YouTube shortcode for private videos causes error and failure to build site
```
ERROR The "youtube" shortcode was unable to get remote resource "https://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DMxxxxxx18". failed to fetch remote resource: Forbidden. See "/workspaces/wiki/content/docs/document.md:48:1"
```
I've xxx'ed the actual URL because it is a private video. So Hugo will not be allowed to view it while building the site. Which is probably why it gets a 403. 

In previous versions, I'm assuming you were ignoring the error and the site builds and views perfectly OK. _I_ can view the video, because _I_ am logged in with my Google account.

I suspect this is going to cause a lot of people (with private videos) some pain.

NB this issue is similar to but NOT a duplicate of #12380 . Not a duplicate because they show a screenshot of a video failing to load in 0.124. On our site, videos load perfectly well with 0.124

### What version of Hugo are you using (`hugo version`)?

<pre>
$ hugo version
hugo v0.125.0+extended linux/arm64 BuildDate=unknown
</pre>

### Does this issue reproduce with the latest release?
Yes, this IS the latest release!


Discussion / hints:
>I suspect this is going to cause a lot of people (with private videos) some pain.

Having a published site with private videos doesn't sound like a common use case.
> > I suspect this is going to cause a lot of people (with private videos) some pain.
> 
> Having a published site with private videos doesn't sound like a common use case.

It's an internal authenticated wiki site.

Fix patch:
diff --git a/tpl/tplimpl/embedded/templates/shortcodes/youtube.html b/tpl/tplimpl/embedded/templates/shortcodes/youtube.html
index a9533b95ec4..bf72be45be8 100644
--- a/tpl/tplimpl/embedded/templates/shortcodes/youtube.html
+++ b/tpl/tplimpl/embedded/templates/shortcodes/youtube.html
@@ -22,6 +22,7 @@
 */}}
 
 {{- $pc := .Page.Site.Config.Privacy.YouTube }}
+{{- $remoteErrID := "err-youtube-remote" }}
 {{- if not $pc.Disable }}
   {{- with $id := or (.Get "id") (.Get 0) }}
 
@@ -31,12 +32,12 @@
     {{- $data := dict }}
     {{- with resources.GetRemote $url }}
       {{- with .Err }}
-        {{- errorf "The %q shortcode was unable to get remote resource %q. %s. See %s" $.Name $url . $.Position }}
+        {{- erroridf $remoteErrID "The %q shortcode was unable to get remote resource %q. %s. See %s" $.Name $url . $.Position }}
       {{- else }}
         {{- $data = .Content | transform.Unmarshal }}
       {{- end }}
     {{- else }}
-      {{- errorf "The %q shortcode was unable to get remote resource %q. See %s" $.Name $url $.Position }}
+      {{- erroridf $remoteErrID "The %q shortcode was unable to get remote resource %q. See %s" $.Name $url $.Position }}
     {{- end }}
 
     {{/* Set defaults. */}}


Test patch: