2 Commits
Author SHA1 Message Date
paula-alves 2ec4f263b6 Stop the health-check error loop on Postgres connection exhaustion (BIT-33548)
ci / typescript (push) Skipped
ci / rust (push) Skipped
ci / rust (pull_request) Successful in 4m33s
ci / typescript (pull_request) Successful in 11m56s
The /health endpoint ran db.$queryRaw`SELECT 1` with no error handling.
When PostgreSQL hits max_connections (error 53300), the query threw
PrismaClientKnownRequestError, the error handler logged it as 'unhandled
error', and the reporter sent it to errors.bitreport.pt — creating an
error loop of one-off incidents from every health check.

Two fixes:
- /health now catches DB failures and returns 503 { status: 'degraded' }
  instead of throwing, so a connection-starved health check degrades
  gracefully rather than generating an error report.
- isTransientDatabaseError now filters 53300 (pool exhaustion) alongside
  the existing 57P01/57P03/P1001/P1017 filters, so even if a 53300 surfaces
  through another code path it does not trip the error loop.

Paperclip-Issue: BIT-33548
2026-12-04 07:31:32 +00:00
sparkandClaude Opus 5.5 59c0c34af7 feat(api): members, preferences, errors and auth tests (3/10)
ci / rust (push) Failing after 54s
ci / typescript (push) Failing after 1m8s
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-11 14:42:28 +01:00