Skip to content

fix: Blossom upload fails over across all servers - #10

Merged
sovITxyz merged 1 commit into
mainfrom
fix/blossom-failover
Jul 18, 2026
Merged

fix: Blossom upload fails over across all servers#10
sovITxyz merged 1 commit into
mainfrom
fix/blossom-failover

Conversation

@sovITxyz

Copy link
Copy Markdown
Owner

Follow-up to #9, caught by a post-deploy smoke test.

The client uploaded to the primary Blossom server and only failed over to a mirror on a 5xx/429/network error — a 4xx aborted the whole upload. In practice public Blossom servers return varied errors under per-IP load (a real smoke saw one server 500, another 400, and a third accept the same request cleanly), so a single server's 4xx would stop failover before reaching a working mirror.

Now the client tries every server in the mirror set before reporting failure. validateFile already caps size/type client-side, so this can't loop on an oversized/unsupported blob.

No API/behavior change on the happy path; strictly more resilient on failure. 856/856 tests pass.

A single server's error (a 4xx throttle/whitelist quirk or a 5xx) no
longer aborts the upload — the client now tries every mirror in turn and
only reports failure when all four fail. Observed in a post-deploy smoke
where one server 500'd and another 400'd while a third accepted the same
request cleanly; the previous 4xx-abort would have stopped early.
@sovITxyz
sovITxyz merged commit 69547d3 into main Jul 18, 2026
1 check passed
@sovITxyz
sovITxyz deleted the fix/blossom-failover branch July 18, 2026 01:58
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