diegosouzapw/OmniRoute · error · Error
${json.error} || HTTP ${res.status}
Error message
${json.error} || HTTP ${res.status} What it means
Error "${json.error} || HTTP ${res.status}" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/app/(dashboard)/dashboard/combos/ComboControlCenterClient.tsx:71
critical: "border-red-500/20 bg-red-500/10 text-red-400",
idle: "border-blue-500/20 bg-blue-500/10 text-blue-400",
};
function toArray<T>(value: unknown): T[] {
return Array.isArray(value) ? (value as T[]) : [];
}
async function fetchJson<T>(url: string): Promise<T> {
const res = await fetch(url, { cache: "no-store" });
const json = await res.json().catch(() => ({}));
if (!res.ok) {
const message =
typeof json?.error === "string"
? json.error
: typeof json?.error?.message === "string"
? json.error.message
: `HTTP ${res.status}`;
throw new Error(message);
}
return json as T;
}
function fmtPercent(value: number | null | undefined): string {
if (typeof value !== "number" || !Number.isFinite(value)) return "—";
return `${Math.round(value)}%`;
}
function fmtMs(value: number | null | undefined): string {
if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) return "—";
return `${Math.round(value)}ms`;
}
function fmtDate(value: string | null | undefined): string {
if (!value) return "—";
const date = new Date(value);
if (Number.isNaN(date.getTime())) return "—";View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/app/(dashboard)/dashboard/combos/ComboControlCenterClient.tsx:71 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/8df3eb02a5fb9a16.
Report an issue: GitHub.