Munchable depends on more things than it should. Postgres, Redis, an auth provider, Stripe, a mail provider, a model API, a cron scheduler. On any given day one of them is slower than it was yesterday, and roughly once a quarter one of them is simply not there.
There is no resilience.ts in this repo and no circuit breaker library. What there is instead is 168 catch blocks and .catch() calls outside the tests, each written at the moment I was holding the problem. I went through them looking for a policy, and found that there is one, and that it is not the policy I would have written down in advance.
Here are the two that got me to it. They guard two API routes, they are the same five lines, and they do opposite things.
// app/api/product-search/route.ts try { decision = await enforceParallel ( [ { limiter : lim . searchDev , key : user . id } , { limiter : lim .…