diegosouzapw/OmniRoute · error · Error
${res.status}
Error message
${res.status} What it means
The cache-health dashboard effect got a non-OK status from the cache health API; the thrown Error carries the HTTP status code so the tab can show why utilization data is unavailable. Client-side only — the API itself returned its own error payload before this fired.
Solutions
- Confirm the cache-health endpoint responds 200 for the requested range
- Check server logs for the failing analytics query
- Retry transient 5xx before showing the error state
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/app/(dashboard)/dashboard/analytics/CacheHealthTab.tsx:87 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/f66aab180240c6ca.
Report an issue: GitHub.
Appendix: source
Thrown at src/app/(dashboard)/dashboard/analytics/CacheHealthTab.tsx:87
<span className="text-2xl font-semibold text-text-main">{value}</span>
{hint ? <span className="text-xs text-text-muted">{hint}</span> : null}
</div>
);
}
export default function CacheHealthTab() {
const t = useTranslations("analytics") as Translator;
const [range, setRange] = useState<UtilizationTimeRange>("24h");
const [data, setData] = useState<CacheHealthResponse | null>(null);
const [loading, setLoading] = useState(true);
const [error, setError] = useState<string | null>(null);
const load = useCallback(async (r: UtilizationTimeRange) => {
setLoading(true);
setError(null);
try {
const res = await fetch(`/api/usage/cache-health?range=${r}`);
if (!res.ok) throw new Error(String(res.status));
setData((await res.json()) as CacheHealthResponse);
} catch {
setError("load-failed");
setData(null);
} finally {
setLoading(false);
}
}, []);
useEffect(() => {
void load(range);
}, [load, range]);
if (loading) return <Skeleton className="h-64 w-full" />;
if (error || !data) {
return (
<Card>View on GitHub (pinned to a179ffed5b)