diegosouzapw/OmniRoute · error · Error

Failed to reset settings

Error message

Failed to reset settings

What it means

The reset action's request to the Grok Build SETTINGS_ENDPOINT (restore defaults) returned non-OK; errorText falls back to 'Failed to reset settings'. Server-side rejection of the reset — settings files were not reverted and the card shows the error message.

Solutions

  1. Verify the reset action param on the settings endpoint
  2. Surface the server error text
  3. Check server logs for the failing reset request
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/app/(dashboard)/dashboard/cli-code/components/GrokBuildToolCard.tsx:308 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/7761da161cc4515c. Report an issue: GitHub.

Appendix: source

Thrown at src/app/(dashboard)/dashboard/cli-code/components/GrokBuildToolCard.tsx:308

      });
      const body: unknown = await response.json();
      if (!response.ok) throw new Error(errorText(body, "Failed to apply settings"));
      setMessage({ type: "success", text: "Grok Build settings applied." });
      await Promise.all([refreshStatus(), refreshBackups()]);
    } catch (error) {
      setMessage({ type: "error", text: error instanceof Error ? error.message : String(error) });
    } finally {
      setApplying(false);
    }
  };

  const reset = async () => {
    setResetting(true);
    setMessage(null);
    try {
      const response = await fetch(SETTINGS_ENDPOINT, { method: "DELETE" });
      const body: unknown = await response.json();
      if (!response.ok) throw new Error(errorText(body, "Failed to reset settings"));
      setMessage({ type: "success", text: "Grok Build settings reset." });
      await Promise.all([refreshStatus(), refreshBackups()]);
    } catch (error) {
      setMessage({ type: "error", text: error instanceof Error ? error.message : String(error) });
    } finally {
      setResetting(false);
    }
  };

  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) => {

View on GitHub (pinned to a179ffed5b)