API fails gracefully with partial UI rendering
Why it matters
When an API call fails, applications that render nothing leave users with no way to understand what happened or what they can still do. ISO 25010 reliability.fault-tolerance expects partial operation: a profile page should still show the edit form even if the user data fetch fails; a dashboard should still show navigation even if a widget's data source is unavailable. Applications that hard-fail to a blank screen or infinite spinner on any API error eliminate user agency entirely — an especially high-impact defect in payment and checkout flows.
Severity rationale
Medium because full-page blank screens on API failure eliminate user agency and produce abandonment at the exact moments — payment, onboarding — where recovery matters most.
Remediation
Separate required data (block render) from optional data (degrade gracefully). For optional API calls, always return a typed fallback on failure so the page can render partially.
// lib/api.ts — safe fetch helper
export async function safeFetch<T>(
url: string,
fallback: T
): Promise<T> {
try {
const res = await fetch(url)
if (!res.ok) return fallback
return res.json() as Promise<T>
} catch {
return fallback
}
}
// Usage:
const widgets = await safeFetch('/api/dashboard/widgets', [])
// Page renders even if widgets is []
For required data that must succeed (e.g., auth session), let the error propagate to the nearest error boundary rather than swallowing it.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Error Resilience Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- iso-25010:2011 · reliability.fault-tolerance
Taxons
History
- 2026-04-18·v1.0.0·Initial import from error-resilience·automated