| SC-01 | Network timeout on initial page load (e.g., fetch /api/dashboard). No data after 10s. | High: Blank screen for all users. | Skeleton loaders → Offline banner ("Connection lost. Showing cached data.") → Retry button with exponential backoff. Load stale cached data from IndexedDB/Service Worker. | - Metric: ui.load_timeout (count, p95 latency).- Event: network.failure (with error code, retry count).- Log: Structured JSON with user-agent, timestamp, cache hit/miss.- Trace: OpenTelemetry span for fetch → timeout. |
| SC-02 | API returns 5xx error (e.g., backend outage on /api/user-feed). Partial data loads. | Med: Feed empty, but navbar works. | Error boundary: Inline toast ("Feed unavailable. Try refreshing.") + Cached feed items (last 24h). Progressive enhancement: Static placeholder cards. | - Metric: api.error_rate_5xx (per endpoint, bucketed by status).- Event: api.failure (status, endpoint, payload size).- Alert: Threshold >5% error rate → PagerDuty.- Distro: By geography/user segment. |
| SC-03 | API returns 4xx error (e.g., auth expired on /api/profile). User-specific. | Low: Profile panel broken for one user. | Graceful redirect to login modal. Fallback avatar + "Sign in to view profile." Persist draft form data in localStorage. | - Metric: auth.error_rate (401/403 counts).- Event: auth.failure (reason: token_expired, user_id anon-hash).- Log: Sanitized payload, session ID.- Funnel: Drop-off from login flow. |
| SC-04 | Image/CDN failure (e.g., hero banner from external CDN down). | Low: Visual breakage. | <img> with onError handler: Blur-up placeholder (low-res SVG/base64) → Retry after 2s → Ultimate fallback: Solid color block with alt text prominent. | - Metric: asset.load_failure (type: img/css/font, count).- Event: img.error (src URL hash, dimensions).- Histogram: Load time p99 >3s.- CDN-specific tags. |
| SC-05 | JavaScript runtime error in component (e.g., null deref in chart lib). | Med: Component crashes, app survives via ErrorBoundary. | ErrorBoundary renders: Friendly message ("Chart failed to load.") + Minimal text fallback (e.g., "Sales: $X from cache.") + Report button. Hot reload component if possible. | - Metric: js.error_rate (uncaught exceptions/min).- Event: error.boundary (stack trace, component name, browser).- Sentry/Rollbar integration: Breadcrumbs + repro steps.- Alert: >10 errors/5min per release. |
| SC-06 | Offline mode (no network, e.g., airplane mode). App stays responsive. | High: All network ops fail. | PWA manifest + Service Worker: Cache-first strategy. Banner: "Offline. Changes sync when back online." Queue mutations in IDB. | - Metric: offline.duration (session avg).- Event: network.offline (entry/exit timestamps, pending queue size).- Log: Sync failures post-reconnect.- User cohort: Retention impact. |
| SC-07 | Slow third-party script (e.g., analytics/embed widget >5s). Blocks render. | Med: Cumulative layout shift (CLS). | Async/defer loading + preconnect. Fallback: Hide slot → "Loading add-on..." → Remove after 10s + noscript alt content. | - Metric: thirdparty.load_time (p95, vendor-specific).- Event: thirdparty.block (script URL, render_blocking).- Core Web Vitals: Track CLS/INP impact.- Opt-out toggle logging. |
| SC-08 | Dark mode toggle fails (e.g., localStorage quota exceeded). | Low: Theme stuck. | Detect via prefers-color-scheme media query. Fallback prompt: "Theme saved locally?" + Reset button. Sync to server on next login. | - Metric: theme.failure (count).- Event: storage.quota (error, key attempted).- A/B test: Storage usage per feature. |
| SC-09 | GraphQL query partial failure (e.g., one resolver flakes). | Med: Incomplete data (e.g., feed loads but no comments). | @defer/@fallback in GraphQL: Skeleton for deferred fields → Stale data. User notification: "Partial update available." | - Metric: graphql.partial_rate (% queries with errors).- Event: graphql.error (path, resolver name, data_fetched %).- Trace: Apollo/Relay spans end-to-end. |
| SC-10 | Browser incompatibility (e.g., Safari WebGPU fails for viz). | Low: Feature degraded. | Feature detection: if (!window.GPU) → Canvas 2D fallback. Polyfill where possible + UA logging. | - Metric: compat.failure (browser/version matrix).- Event: feature_detect.fail (API name, fallback used).- Heatmap: Usage by device/OS. |