diegosouzapw/OmniRoute · error · Error
Failed to restore backup
Error message
Failed to restore backup
What it means
Error "Failed to restore backup" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/app/(dashboard)/dashboard/cli-code/components/GrokBuildToolCard.tsx:336
const selectModel = (selection: unknown) => {
const value = (selection as { value?: unknown })?.value;
if (typeof value !== "string") return;
if (modelTarget === "main") setModel(value);
else if (modelTarget) setSubagentModels((current) => ({ ...current, [modelTarget]: value }));
setModelTarget(null);
};
const restoreBackup = async (backupId: string) => {
setRestoringBackup(backupId);
setMessage(null);
try {
const response = await fetch("/api/cli-tools/backups", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ tool: "grok-build", backupId }),
});
const body: unknown = await response.json();
if (!response.ok) throw new Error(errorText(body, "Failed to restore backup"));
setMessage({ type: "success", text: "Grok Build backup restored." });
await Promise.all([refreshStatus(), refreshBackups()]);
} catch (error) {
setMessage({ type: "error", text: error instanceof Error ? error.message : String(error) });
} finally {
setRestoringBackup(null);
}
};
const configured = Boolean(status?.hasOmniRoute);
const cliReady = Boolean(status?.installed && status?.runnable);
const effectiveConfigStatus = status
? cliReady
? configured
? "configured"
: "not_configured"
: "not_installed"
: (batchStatus?.config.status ?? null);View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/app/(dashboard)/dashboard/cli-code/components/GrokBuildToolCard.tsx:336 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/3155f4df82c3e8f4.
Report an issue: GitHub.