Commit ac61599
fix(webapp): dashboard run-detail RunPresenter doesn't 'PrismaClient error' on buffered runs
`RunPresenter.call` used `prisma.taskRun.findFirstOrThrow` to load the
run-detail data. For any buffered run (the snapshot lives in Redis,
not PG), the throw fires every page-poll tick and Prisma's `writer`
emits a `PrismaClient error` log line each time — both the run-detail
revalidation poll (~5s) and any Remix `_data` request hit it.
The route loader already catches arbitrary errors from `presenter.call`
and falls back to the mollifier buffer via `tryMollifiedRunFallback`,
so the page renders correctly. But the per-tick error spam pollutes
Sentry / log aggregation, makes real DB issues hard to spot, and (in
`pnpm dev`) triggers Remix's dev-mode error overlay on every poll.
Switch to `findFirst` + explicit null check that throws a typed
`RunNotInPgError`. The route catches it the same way — the
not-found-in-PG case is now off Prisma's error path entirely. `Run
EnvironmentMismatchError` is unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent c16084b commit ac61599
1 file changed
Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
23 | 37 | | |
24 | 38 | | |
25 | 39 | | |
| |||
42 | 56 | | |
43 | 57 | | |
44 | 58 | | |
45 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
46 | 66 | | |
47 | 67 | | |
48 | 68 | | |
| |||
106 | 126 | | |
107 | 127 | | |
108 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
109 | 133 | | |
110 | 134 | | |
111 | 135 | | |
| |||
0 commit comments