Skip to content

Commit 78324df

Browse files
Oleg Samarinclaude
andcommitted
Improved status API diagnostics: show HTTP code and full response body
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f1fc09a commit 78324df

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ jobs:
186186
# (right after upload the state may be empty — log raw response for diagnostics)
187187
STATUS=""
188188
for i in $(seq 1 20); do
189-
RAW=$(curl -sf -H "Authorization: Bearer $AUTH" \
190-
"https://central.sonatype.com/api/v1/publisher/status?id=$DEPLOYMENT_ID" || echo "CURL_FAILED")
189+
RAW=$(curl -s -w "\nHTTP:%{http_code}" -H "Authorization: Bearer $AUTH" \
190+
"https://central.sonatype.com/api/v1/publisher/status?id=$DEPLOYMENT_ID")
191191
echo "[$i/20] Raw status response: $RAW"
192192
STATUS=$(echo "$RAW" | jq -r '.deploymentState // empty' 2>/dev/null || echo "PARSE_FAILED")
193193
echo "[$i/20] Deployment state: $STATUS"
@@ -215,8 +215,8 @@ jobs:
215215
216216
for i in $(seq 1 30); do
217217
sleep 30
218-
RAW=$(curl -sf -H "Authorization: Bearer $AUTH" \
219-
"https://central.sonatype.com/api/v1/publisher/status?id=$DEPLOYMENT_ID" || echo "CURL_FAILED")
218+
RAW=$(curl -s -w "\nHTTP:%{http_code}" -H "Authorization: Bearer $AUTH" \
219+
"https://central.sonatype.com/api/v1/publisher/status?id=$DEPLOYMENT_ID")
220220
STATUS=$(echo "$RAW" | jq -r '.deploymentState // empty' 2>/dev/null || echo "PARSE_FAILED")
221221
echo "[$i/30] State: $STATUS"
222222
[[ "$STATUS" == "PUBLISHED" ]] && break

0 commit comments

Comments
 (0)