fetch
Technical notes on web development, DevOps, and AI integration.
2 articles
- 21:12frontend
Published in the Admin, Empty on the Pillar Page
A freshly published entity never appeared on the pillar page while the API served it fine. The lesson was one cache option: no-store on fetch, page ISR kept intact.
TL;DR: A published entity never showed on the pillar page grid. The page's ISR config was fine; the real culprit was getEntities fetching without a cache option, so Next.js 14 cached the list at build time forever. Adding cache: "no-store" fixed it, plus an E2E parity test guards the regression.
#nextjs#cache#fetch - 04:23backend
XLSX Export from Go, and the Binary Guess That Missed
openapi-fetch does have parseAs blob. The friction is binary-format typing and the DOM download flow.
TL;DR: I assumed openapi-fetch couldn't handle binary downloads, but checking the source showed it supports blobs just fine. The real hurdles were typing that masks blobs as strings and the manual DOM work to trigger downloads. On the backend, the Go export validates module filters and always returns a valid file via excelize, even when empty.
#go#excelize#openapi-fetch