-PATH_CADDY_REPO='https://dl.cloudsmith.io/public/caddy/stable'
-apt-get -qq -y install curl
-curl -1Lf "${PATH_CADDY_REPO}/gpg.key" | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
+apt-get -y install curl > /dev/null
+PATH_CURL_ERROR="$(path_tmp_timestamped curl_error)"
+set +e
+curl -1Lf "${PATH_CADDY_REPO}/gpg.key" 2> "${PATH_CURL_ERROR}" | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
+RESULT="$?"
+set -e
+if [ "${RESULT}" != '0' ]; then
+ cat "${PATH_CURL_ERROR}"
+ exit 1
+fi