diegosouzapw/OmniRoute · error · Error
getErrorMessage(json, `HTTP ${res.status}`)
Error message
getErrorMessage(json, `HTTP ${res.status}`) What it means
Error "getErrorMessage(json, `HTTP ${res.status}`)" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/app/(dashboard)/dashboard/health/ProviderHealthAutopilotCard.tsx:242
);
}
export default function ProviderHealthAutopilotCard() {
const t = useTranslations("providerHealthAutopilot");
const nodeMap = useProviderNodeMap();
const [report, setReport] = useState<AutopilotReport | null>(null);
const [loading, setLoading] = useState(true);
const [error, setError] = useState<string | null>(null);
const [message, setMessage] = useState<string | null>(null);
const [busyAction, setBusyAction] = useState<string | null>(null);
const load = useCallback(async () => {
try {
const res = await fetch("/api/providers/health-autopilot?includeHealthy=false", {
cache: "no-store",
});
const json = await res.json();
if (!res.ok) throw new Error(getErrorMessage(json, `HTTP ${res.status}`));
setReport(json);
setError(null);
} catch (err) {
setError(err instanceof Error ? err.message : t("loadFailed"));
} finally {
setLoading(false);
}
}, [t]);
useEffect(() => {
void load();
const timer = setInterval(() => void load(), 15000);
return () => clearInterval(timer);
}, [load]);
const topProviders = useMemo(
() =>
[...(report?.providers ?? [])].sort((left, right) => left.score - right.score).slice(0, 6),View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/app/(dashboard)/dashboard/health/ProviderHealthAutopilotCard.tsx:242 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/3ab195dbc6d091d9.
Report an issue: GitHub.