Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
anglicus | 1cb75ca | Commit Preview URL Branch Preview URL |
Feb 26 2026, 04:07 PM |
There was a problem hiding this comment.
Pull request overview
Improves the web analytics dashboard’s client-side error handling by providing a clearer fallback message specifically for missing API endpoints (HTTP 404), while keeping the existing fallback for all other error statuses.
Changes:
- Adds a 404-specific fallback error message in the analytics dashboard fetch error parser.
- Preserves the existing fallback message for non-404 responses.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const fallbackMessage = | ||
| response.status === 404 | ||
| ? "Analytics endpoint not found (404). Deploy the latest API and verify VITE_BACKEND_URL." | ||
| : "Analytics request failed"; | ||
|
|
||
| return { | ||
| message: parsed?.error?.message || "Analytics request failed", | ||
| message: parsed?.error?.message || fallbackMessage, |
There was a problem hiding this comment.
This adds new 404-specific fallback messaging but the behavior isn’t covered by tests. Since the web repo already has Vitest unit tests for similar $lib network/client utilities, consider adding a small unit test for parseError (or fetchAnalyticsDashboard) verifying that a 404 with a non-JSON body produces the new fallback message while non-404 statuses keep the existing fallback.
Summary
Validation