Skip to content

fix: retry cold ipfs proxy connects once per gateway - #21

Merged
erubboli merged 1 commit into
mainfrom
fix/ipfs-cold-connect-retry
Oct 12, 2026
Merged

erubboli merged 1 commit into
mainfrom
fix/ipfs-cold-connect-retry

Conversation

@erubboli

Copy link
Copy Markdown
Member

Problem

Token icons kept disappearing intermittently even though the deployed /ipfs proxy code was correct. In-container instrumentation showed the route's upstream fetch to the production proxy failing with connect-level ETIMEDOUT well under the 12s gateway budget — and succeeding on an immediate identical retry. Cold connects from a small container to the proxy flake; the route treated a network throw the same as a gateway failure and moved on (with a single default gateway, straight to 502), so token metadata resolved to null and the UI showed letter avatars.

Fix

  • Network-level throws (connect errors, aborts) are retried once on the same gateway. HTTP-level statuses are never retried — they are answers, not accidents (covered by tests).
  • Moves the colocated route test out of src/pages: Astro was compiling [...path].test.ts as a phantom endpoint route importing vitest, which does not exist in production (any future /ipfs/*.test request would 500).

Tests

  • retries a network-level throw on the same gateway once
  • does not retry HTTP-level failures
  • full suite: 70 files / 844 tests green, tsc clean, astro build OK

@erubboli
erubboli merged commit bd0880c into main Oct 12, 2026
14 checks passed
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