diegosouzapw/OmniRoute · error · Error

Failed to save exact alias

Error message

Failed to save exact alias

What it means

Error "Failed to save exact alias" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/app/(dashboard)/dashboard/settings/components/ModelAliasesUnified.tsx:75

    loadAliases();
  }, []);

  const showStatus = (type: "success" | "error", message: string) => {
    setStatus({ type, message });
    setTimeout(() => setStatus({ type: "", message: "" }), 2500);
  };

  const addExactAlias = async () => {
    if (!fromValue.trim() || !toValue.trim()) return;
    setSaving(true);
    try {
      const res = await fetch("/api/settings/model-aliases", {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify({ from: fromValue.trim(), to: toValue.trim() }),
      });
      if (!res.ok) throw new Error("Failed to save exact alias");
      const data = await res.json();
      setCustomAliases(data.custom || {});
      setFromValue("");
      setToValue("");
      showStatus("success", translateOrFallback(t, "saved", "Saved"));
    } catch (error) {
      console.error("Failed to save exact alias:", error);
      showStatus("error", translateOrFallback(t, "errorOccurred", "An error occurred"));
    } finally {
      setSaving(false);
    }
  };

  const removeExactAlias = async (from: string) => {
    setSaving(true);
    try {
      const res = await fetch("/api/settings/model-aliases", {
        method: "DELETE",

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/app/(dashboard)/dashboard/settings/components/ModelAliasesUnified.tsx:75 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/eed1550cf2c671fc. Report an issue: GitHub.