Tech
A failed read must throw, not return 0 — how Next.js ISR bakes your fallback into the cache
I run a directory site: ~3,500 rows in Postgres, read over PostgREST, rendered by Next.js with revalidate on every route. The headline number in the shell says "Search all 3,516 listings."
For about a day it said "Search all 0 listings" — next to a grid full of listings.
The database was fine by then. Three separate bugs conspired, and all three are the same mistake wearing different clothes: a read that degrades politely on failure, sitting underneath a cache that stores the polite ans...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to