-
Notifications
You must be signed in to change notification settings - Fork 0
Improve error feedback in the UI with structured messages #15
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestuxUser interface and experienceUser interface and experience
Description
Problem
API errors currently surface as generic "Unexpected server error" messages in the UI. Users have no way to understand what went wrong or how to fix it. On the server side, some try-catch blocks silently swallow errors (especially during JSON parsing in ingestion).
Proposed Solution
Server Side
- Error codes — Define an enum of error codes (e.g.,
AUTH_FAILED,VALIDATION_ERROR,DB_ERROR,NOT_FOUND) - Structured error responses —
{ error: { code: string, message: string, details?: object } } - Error logging — Replace silent catches with structured logging that includes context
Client Side
- Error display component — Reusable component that renders errors based on code/type
- User-friendly messages — Map error codes to actionable messages
- Toast notifications — Use existing toast/sonner for non-blocking errors
- Retry affordance — Where appropriate, offer a "Try again" button
Acceptance Criteria
- All API routes return structured error responses with error codes
- No silent error swallowing — all caught errors are logged with context
- UI displays meaningful error messages (not raw error text)
- Critical errors show inline; transient errors use toast notifications
- At least one "retry" affordance for recoverable errors
🤖 Generated with Claude Code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestuxUser interface and experienceUser interface and experience