diegosouzapw/OmniRoute · error · Error

save_failed

Error message

save_failed

What it means

Sentinel thrown by applyResponse when a radar catalog state mutation (hide/restore a model) returns non-OK. 'save_failed' is a fixed string, not localized — it signals the tombstone/state write to the radar catalog was rejected server-side.

Solutions

  1. Retry the toggle; the state write is idempotent
  2. Verify the radar feature flag is enabled (404 means flag off)
  3. Check /api/radar catalog state endpoint logs
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/app/(dashboard)/dashboard/radar/RadarCatalogTable.tsx:108 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/bca39c3d433a37e3. Report an issue: GitHub.

Appendix: source

Thrown at src/app/(dashboard)/dashboard/radar/RadarCatalogTable.tsx:108

      const payload = await response.json();
      setStates(Array.isArray(payload.states) ? payload.states : []);
    } catch {
      onError(t("errorLoading"));
    }
  }, [onError, t]);

  useEffect(() => {
    void loadState();
  }, [loadState]);

  const stateByKey = useMemo(
    () => new Map(states.map((state) => [`${state.provider}:${state.modelId}`, state])),
    [states]
  );
  const hiddenModels = useMemo(() => states.filter((state) => state.tombstoned), [states]);

  const applyResponse = useCallback(async (response: Response) => {
    if (!response.ok) throw new Error("save_failed");
    const payload = await response.json();
    setStates(Array.isArray(payload.states) ? payload.states : []);
  }, []);

  const mutate = useCallback(
    async (operation: () => Promise<Response>) => {
      setSaving(true);
      onError("");
      try {
        await applyResponse(await operation());
        setEditingKey(null);
        await refreshCatalog();
      } catch {
        onError(t("localStateSaveFailed"));
      } finally {
        setSaving(false);
      }
    },

View on GitHub (pinned to a179ffed5b)