Jordi Enric
ec26943390
feat: improve db overload debugging UX ( #43564 )
...
When the dashboard hits a DB connection timeout, users currently see a
raw error message with no
path forward. This PR adds an inline troubleshooting system that detects
known error types and
surfaces contextual next steps — restart the DB, read the docs, or debug
with AI.
## Changes
- New ErrorDisplay component (packages/ui-patterns) — styled error card
with a title, monospace error
block, optional troubleshooting slot, and a "Contact support" link that
always renders. Accepts
typed supportFormParams to pre-fill the support form.
- Error classification in handleError (data/fetchers.ts) — on every API
error, the message is tested
against ERROR_PATTERNS. If matched, handleError throws a typed subclass
(ConnectionTimeoutError
extends ResponseError) instead of a plain ResponseError. Stack traces
now show the exact error
class. All existing instanceof ResponseError checks continue to work.
- ErrorMatcher component — reads errorType from the thrown class
instance, does an O(1) lookup into
ERROR_MAPPINGS, and renders the matching troubleshooting accordion as
children of ErrorDisplay.
Falls back to plain ErrorDisplay for unclassified errors.
- Connection timeout mapping — first error type wired up, with three
troubleshooting steps: restart
the database, link to the docs, and "Debug with AI" (opens the AI
assistant sidebar with a
pre-filled prompt).
- Telemetry — three new typed events track when the troubleshooter is
shown, when accordion steps are
toggled, and which CTAs are clicked.
## Adding a new error type
1. Add a class to types/api-errors.ts
2. Add { pattern, ErrorClass } to data/error-patterns.ts
3. Create a troubleshooting component in errorMappings/
4. Add an entry to error-mappings.tsx
2026-03-16 11:22:30 +01:00
..
2024-05-23 17:39:56 +08:00
2025-12-05 02:11:16 +00:00
2025-12-10 08:05:30 +00:00
2024-05-24 09:21:41 +00:00
2026-02-24 16:14:03 +11:00
2026-02-27 16:23:08 +11:00
2024-05-24 09:21:41 +00:00
2026-02-25 16:27:48 +08:00
2025-12-10 08:05:30 +00:00
2025-12-17 11:24:36 +00:00
2025-12-17 11:24:36 +00:00
2025-12-17 11:24:36 +00:00
2025-12-17 11:24:36 +00:00
2026-02-05 13:54:10 +01:00
2024-09-30 21:41:26 +02:00
2024-09-30 21:41:26 +02:00
2024-05-23 17:39:56 +08:00
2025-12-02 11:15:50 +11:00
2024-05-23 17:39:56 +08:00
2025-12-02 11:15:50 +11:00
2026-02-05 13:54:10 +01:00
2024-06-12 18:38:35 +08:00
2024-06-12 18:38:35 +08:00
2024-06-12 18:38:35 +08:00
2024-06-12 18:38:35 +08:00
2026-02-05 13:54:10 +01:00
2024-06-12 18:38:35 +08:00
2024-05-23 17:39:56 +08:00
2024-06-12 18:38:35 +08:00
2024-06-12 18:38:35 +08:00
2024-06-12 18:38:35 +08:00
2024-06-12 18:38:35 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-08-30 16:51:05 +08:00
2024-08-30 16:51:05 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2025-09-02 09:54:06 +01:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:39:56 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-07-16 14:14:03 -04:00
2024-07-16 14:14:03 -04:00
2024-07-16 14:14:03 -04:00
2024-07-16 14:14:03 -04:00
2024-07-16 14:14:03 -04:00
2024-07-16 14:14:03 -04:00
2024-07-16 14:14:03 -04:00
2024-07-16 14:14:03 -04:00
2025-12-17 11:24:36 +00:00
2024-05-23 17:39:56 +08:00
2025-12-15 10:44:08 +00:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2025-12-15 10:44:08 +00:00
2025-12-15 10:44:08 +00:00
2025-12-15 10:44:08 +00:00
2025-12-15 10:44:08 +00:00
2026-02-05 13:54:10 +01:00
2026-02-20 14:10:13 +01:00
2026-02-05 13:54:10 +01:00
2025-10-16 13:44:40 +11:00
2025-10-16 13:44:40 +11:00
2025-10-16 13:44:40 +11:00
2025-10-16 13:44:40 +11:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2025-12-17 11:24:36 +00:00
2026-02-05 13:54:10 +01:00
2025-12-17 11:24:36 +00:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2025-11-11 14:13:06 +11:00
2025-11-27 17:26:20 +08:00
2026-02-05 13:54:10 +01:00
2025-11-28 14:57:56 +08:00
2025-11-28 14:57:56 +08:00
2025-12-11 13:38:26 +11:00
2026-03-16 11:22:30 +01:00
2026-03-16 11:22:30 +01:00
2024-07-12 11:32:20 +02:00
2025-12-09 09:47:46 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-01-06 08:04:28 +10:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-24 09:40:15 +00:00
2024-05-23 17:39:56 +08:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-24 09:40:15 +00:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-10-31 00:55:08 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:39:56 +08:00
2026-02-05 13:54:10 +01:00
2024-10-01 11:29:37 +02:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2025-12-10 13:10:18 +00:00
2024-05-23 17:39:56 +08:00
2025-12-03 11:46:39 +00:00
2025-12-03 11:46:39 +00:00
2025-12-03 11:46:39 +00:00
2025-12-03 11:46:39 +00:00
2025-12-03 11:46:39 +00:00
2025-12-03 11:46:39 +00:00
2025-12-03 11:46:39 +00:00
2025-12-03 11:46:39 +00:00
2025-12-03 11:46:39 +00:00
2025-12-03 11:46:39 +00:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-06-05 10:06:55 +00:00
2025-12-02 11:15:50 +11:00
2024-06-05 10:06:55 +00:00
2024-06-05 10:06:55 +00:00
2026-02-05 13:54:10 +01:00
2024-10-25 15:43:15 +02:00
2024-10-25 15:43:15 +02:00
2025-02-11 10:40:51 +08:00
2024-10-25 15:43:15 +02:00
2024-10-25 15:43:15 +02:00
2024-10-25 15:43:15 +02:00
2024-10-25 15:43:15 +02:00
2024-10-25 15:43:15 +02:00
2025-10-08 10:18:43 +11:00
2025-10-08 10:18:43 +11:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2025-11-11 04:02:30 +00:00
2025-12-01 16:51:34 +08:00
2025-12-02 14:18:21 +00:00
2026-02-05 13:54:10 +01:00
2025-11-27 15:38:10 +00:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-01-21 10:18:15 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:44:45 +02:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:44:45 +02:00
2026-02-05 13:54:10 +01:00
2026-02-23 19:48:19 +01:00
2026-02-23 19:48:19 +01:00
2026-02-23 19:48:19 +01:00
2026-02-23 19:48:19 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2026-03-06 03:17:35 +00:00
2025-12-17 11:24:36 +00:00
2025-12-17 11:24:36 +00:00
2025-12-17 11:24:36 +00:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-07-19 12:38:42 +02:00
2024-07-19 12:38:42 +02:00
2024-08-31 07:50:51 +08:00
2026-03-12 10:57:46 +00:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-03-13 11:18:54 +11:00
2026-03-13 11:18:54 +11:00
2025-12-11 13:38:26 +11:00
2025-12-11 13:38:26 +11:00
2026-03-13 11:18:54 +11:00
2026-01-20 03:24:10 +00:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2025-12-17 11:24:36 +00:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:39:56 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2025-01-20 22:23:45 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2025-03-31 11:58:01 +02:00
2025-03-31 11:58:01 +02:00
2025-12-02 14:18:21 +00:00
2025-12-02 14:18:21 +00:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2025-12-02 14:18:21 +00:00