The site home page SSR fetches galleries, latest, and popular in Promise.all. When the API has a transient Postgres outage, the galleries endpoint returns 500 and the site rethrows it, tripping the Error Loop reporter.
Wrap non-critical fetches (galleries, latest, popular) with a safe() helper that returns empty data on server errors while keeping:
404 → NotFound (unconfigured shop)
500 from getSite() as a real error
Test
New test apps/site/src/app/page.test.ts mocks the API returning 500 for /v1/public/galleries and asserts the home page load returns empty galleries instead of throwing. Also covers 404 → null and 500 from site → throw.
Paperclip-Issue: BIT-33535
## Fix
The site home page SSR fetches galleries, latest, and popular in `Promise.all`. When the API has a transient Postgres outage, the galleries endpoint returns 500 and the site rethrows it, tripping the Error Loop reporter.
Wrap non-critical fetches (galleries, latest, popular) with a `safe()` helper that returns empty data on server errors while keeping:
- 404 → `NotFound` (unconfigured shop)
- 500 from `getSite()` as a real error
## Test
New test `apps/site/src/app/page.test.ts` mocks the API returning 500 for `/v1/public/galleries` and asserts the home page load returns empty galleries instead of throwing. Also covers 404 → null and 500 from site → throw.
Paperclip-Issue: BIT-33535
The site home page SSR fetches galleries, latest, and popular in
Promise.all. When the API has a transient Postgres outage, the
galleries endpoint returns 500 and the site rethrows it, tripping
the Error Loop reporter. Wrap non-critical fetches (galleries,
latest, popular) with a safe() helper that returns empty data on
server errors while keeping 404 -> NotFound and 500 from getSite()
as real errors.
Paperclip-Issue: BIT-33535
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fix
The site home page SSR fetches galleries, latest, and popular in
Promise.all. When the API has a transient Postgres outage, the galleries endpoint returns 500 and the site rethrows it, tripping the Error Loop reporter.Wrap non-critical fetches (galleries, latest, popular) with a
safe()helper that returns empty data on server errors while keeping:NotFound(unconfigured shop)getSite()as a real errorTest
New test
apps/site/src/app/page.test.tsmocks the API returning 500 for/v1/public/galleriesand asserts the home page load returns empty galleries instead of throwing. Also covers 404 → null and 500 from site → throw.Paperclip-Issue: BIT-33535