Skip to content

Report what GitHub said when the commit request fails, and retry a transient one - #1

Merged
barnumbirr merged 1 commit into
masterfrom
report-what-github-said
Sep 3, 2026
Merged

Report what GitHub said when the commit request fails, and retry a transient one#1
barnumbirr merged 1 commit into
masterfrom
report-what-github-said

Conversation

@barnumbirr

@barnumbirr barnumbirr commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

--fail-with-body writes the error body and exits non-zero. Under set -e that
exit skipped the reporting below it and the EXIT trap then deleted the file,
so an auth failure or a 502 surfaced as curl's generic "returned error: NNN"
and nothing GitHub actually said. The careful error handling that exists only
ever ran on HTTP 200, which is where GraphQL puts most of its errors -- but
not 401s, rate limits or 5xx.

The request also had no timeout and no retry, and it runs after the archive
has already been published to R2: a transient failure here leaves the bucket
ahead of both state branches until the next ingest repairs it. A retry is
safe rather than merely convenient, because expectedHeadOid makes the mutation
conditional -- if the first attempt did land, the retry is refused for the
right reason instead of committing twice.

…ansient one

--fail-with-body writes the error body and exits non-zero. Under set -e that
exit skipped the reporting below it and the EXIT trap then deleted the file,
so an auth failure or a 502 surfaced as curl's generic "returned error: NNN"
and nothing GitHub actually said. The careful error handling that exists only
ever ran on HTTP 200, which is where GraphQL puts most of its errors -- but
not 401s, rate limits or 5xx.

The request also had no timeout and no retry, and it runs after the archive
has already been published to R2: a transient failure here leaves the bucket
ahead of both state branches until the next ingest repairs it. A retry is
safe rather than merely convenient, because expectedHeadOid makes the mutation
conditional -- if the first attempt did land, the retry is refused for the
right reason instead of committing twice.
@barnumbirr
barnumbirr force-pushed the report-what-github-said branch from 6e49111 to 0621383 Compare September 3, 2026 07:00
@barnumbirr
barnumbirr merged commit 64792bf into master Sep 3, 2026
1 check passed
@barnumbirr
barnumbirr deleted the report-what-github-said branch September 3, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant