Commit d27ee9d
fix(webapp): collapse Prisma P1001 errors into a single Sentry issue
DB outages currently produce hundreds of distinct Sentry issues — one per
call site — which buries other alerts. Add a beforeSend rule that detects
err.code === "P1001" (KnownRequestError when a connection drops mid-query)
or err.errorCode === "P1001" (InitializationError when the client fails to
connect at startup) and assigns a stable fingerprint plus a db_unreachable
tag so all P1001 events collapse into one issue regardless of stack trace.
The rule list is extensible — additional fan-out errors can be added with
one entry.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 5788573 commit d27ee9d
2 files changed
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
4 | 23 | | |
5 | 24 | | |
6 | 25 | | |
| |||
29 | 48 | | |
30 | 49 | | |
31 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
32 | 65 | | |
33 | 66 | | |
34 | 67 | | |
| |||
0 commit comments