Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
ci: fix connection failure detection in docs health check
Curl failures (DNS, timeout, refused) were silently passing because stdout contained both the http_code and the fallback "000", making the status check fail on both comparisons. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sushmithamallesh committed
Feb 17, 2026 at 18:46 UTC
f459c2a830c07cd3a499466c73c5fb1c2ade5a7f
1 file changed
+6
-2
.github/workflows/docs.health-check.yml
+6
-2
@@ -23,8 +23,12 @@ jobs:
23
local url="$2"
24
local extra_args="${3:-}"
25
CHECKED=$((CHECKED + 1))
26
- STATUS=$(curl -sL -o /dev/null -w "%{http_code}" --max-time 15 $extra_args "$url" || echo "000")
27
- if [ "$STATUS" -ge 400 ] || [ "$STATUS" = "000" ]; then
26
+ if STATUS=$(curl -sL -o /dev/null -w "%{http_code}" --max-time 15 $extra_args "$url" 2>/dev/null); then
27
+ :
28
+ else
29
+ STATUS="000"
30
+ fi
31
+ if [ "$STATUS" -ge 400 2>/dev/null ] || [ "$STATUS" = "000" ]; then
32
echo "FAIL: ${label} → ${STATUS}"
33
echo "${label} → ${STATUS}" >> "$FAIL_FILE"
34
FAIL_COUNT=$((FAIL_COUNT + 1))