[object Object]

← back to Cncp Domains

Add curl timeouts and fix doubled 000 HTTP status on George send failure

5b4f8fe60b87d8ec7fffdceaef68959f68493aec · 2026-05-18 20:12:23 -0700 · SteveStudio2

Files touched

Diff

commit 5b4f8fe60b87d8ec7fffdceaef68959f68493aec
Author: SteveStudio2 <steve@designerwallcoverings.com>
Date:   Mon May 18 20:12:23 2026 -0700

    Add curl timeouts and fix doubled 000 HTTP status on George send failure
---
 scripts/expiring-soon.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/expiring-soon.sh b/scripts/expiring-soon.sh
index ce6bc56..3c06542 100755
--- a/scripts/expiring-soon.sh
+++ b/scripts/expiring-soon.sh
@@ -168,10 +168,12 @@ PAYLOAD="$(jq -nc \
   '{to:$to, subject:$subject, body:$body}')"
 
 HTTP_OUT="$(curl -sS -o "${LOG_DIR}/last-george.json" -w '%{http_code}' \
+  --connect-timeout 5 --max-time 30 \
   -X POST "${GEORGE_URL}" \
   -u "${GEORGE_AUTH}" \
   -H 'content-type: application/json' \
-  --data-binary "${PAYLOAD}" 2>>"${LOG_DIR}/last-george.err" || echo "000")"
+  --data-binary "${PAYLOAD}" 2>>"${LOG_DIR}/last-george.err")"
+# curl's -w '%{http_code}' already emits "000" on connection failure; no fallback needed.
 
 if [[ "${HTTP_OUT}" =~ ^2 ]]; then
   echo "[expiring-soon] sent ${COUNT} expiring domains to ${RECIPIENT} (HTTP ${HTTP_OUT})"

← 29bbeea snapshot: backup uncommitted work (1 files)  ·  back to Cncp Domains  ·  snapshot — gitify backup 2026-05-19 685549a →