Surface API errors in the publish step #5

Merged
jknapp merged 1 commits from ci/harden-publish into main 2026-08-29 03:39:58 +00:00
Owner

The publish job has never completed successfully. On the v1.0.0 tag it failed with SyntaxError: Unexpected end of JSON input — an empty curl body piped into JSON.parse — which said nothing about the real cause (an unset token). An opaque failure there costs a full three-platform build.

  • Routes API calls through a helper that captures the HTTP status and prints the response body on 4xx/5xx.
  • Iterates artifacts with while read instead of word-splitting find, so spaces cannot split filenames.
  • Dumps the artifact tree when nothing matches, instead of just claiming none were found.

Verified against the live API: an existing tag resolves to its release id (930 for v1.0.0), and a missing tag reports HTTP 404 with the body while yielding an empty id so the create path runs.

🤖 Generated with Claude Code

The publish job has never completed successfully. On the v1.0.0 tag it failed with `SyntaxError: Unexpected end of JSON input` — an empty curl body piped into `JSON.parse` — which said nothing about the real cause (an unset token). An opaque failure there costs a full three-platform build. - Routes API calls through a helper that captures the HTTP status and prints the response body on 4xx/5xx. - Iterates artifacts with `while read` instead of word-splitting `find`, so spaces cannot split filenames. - Dumps the artifact tree when nothing matches, instead of just claiming none were found. Verified against the live API: an existing tag resolves to its release id (930 for v1.0.0), and a missing tag reports HTTP 404 with the body while yielding an empty id so the create path runs. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jknapp added 1 commit 2026-08-29 03:39:56 +00:00
The publish job has never run successfully. When it failed on the v1.0.0
tag it reported "SyntaxError: Unexpected end of JSON input" from piping an
empty curl body into JSON.parse, which said nothing about the actual cause
(an unset token). An opaque failure there costs a full three-platform build.

Routes every call through a helper that captures the HTTP status and prints
the response body on 4xx/5xx. Also switches artifact iteration to while-read
so filenames with spaces cannot split, and dumps the artifact tree when
nothing matches.

Helper verified against the live API: existing tag resolves to its release
id, a missing tag reports HTTP 404 with the body and yields an empty id so
the create path runs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
jknapp merged commit f73ea93dde into main 2026-08-29 03:39:58 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: streamer-tools/whats-that-music#5