fix(reporter): filter Prisma P2037 pool-exhaustion as transient (BIT-33537) #325

Merged
jos-alves merged 1 commits from fix/BIT-33537-p2037-connection-exhaustion-filter into main 2026-12-04 10:43:50 +00:00
1 Commits
Author SHA1 Message Date
paula-alves 1c5bfce97f fix(reporter): filter Prisma P2037 pool-exhaustion as transient (BIT-33537)
ci / typescript (push) Skipped
ci / rust (push) Skipped
ci / rust (pull_request) Successful in 6m49s
ci / typescript (pull_request) Successful in 13m29s
Prisma surfaces PostgreSQL's 53300 (too many clients) as P2037 with the
message 'Too many database connections opened: sorry, too many clients
already' — no SQLSTATE in the text. The existing isTransientDatabaseError
filter checked for 53300 in the message and P1001/P1017 by code, so P2037
slipped through and was reported to errors.bitreport.pt on every API
request that hit pool exhaustion, tripping the Error Loop.

Add P2037 to the code check and 'too many clients already' to the regex
so the reporter stays quiet for this transient condition, consistent with
the 53300 filter added in BIT-33548.

Paperclip-Issue: BIT-33537
2026-12-04 10:18:56 +00:00