diegosouzapw/OmniRoute · error · Error

HTTP ${res.status}

Error message

HTTP ${res.status}

What it means

Error "HTTP ${res.status}" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/app/(dashboard)/dashboard/cli-code/components/CliProfileAutoSyncToggles.tsx:34

/**
 * Toggle card for the opt-in "auto-sync CLI profiles after model discovery" feature.
 * Reads/writes the OMNIROUTE_AUTO_SYNC_{CODEX,CLAUDE}_PROFILES feature flags via
 * /api/settings/feature-flags. Both default off; enabling one makes a provider model
 * sync regenerate that tool's profile files from the live catalog.
 */
export default function CliProfileAutoSyncToggles() {
  const t = useTranslations("cliTools");
  const [codexOn, setCodexOn] = useState(false);
  const [claudeOn, setClaudeOn] = useState(false);
  const [loading, setLoading] = useState(true);
  const [savingKey, setSavingKey] = useState<string | null>(null);
  const [error, setError] = useState<string | null>(null);

  const load = useCallback(async () => {
    setLoading(true);
    try {
      const res = await fetch("/api/settings/feature-flags");
      if (!res.ok) throw new Error(`HTTP ${res.status}`);
      const data = await res.json();
      const flags: FlagEntry[] = Array.isArray(data.flags) ? data.flags : [];
      setCodexOn(isOn(flags.find((f) => f.key === CODEX_KEY)?.effectiveValue));
      setClaudeOn(isOn(flags.find((f) => f.key === CLAUDE_KEY)?.effectiveValue));
      setError(null);
    } catch (err) {
      setError(err instanceof Error ? err.message : t("profileSyncLoadFailed"));
    } finally {
      setLoading(false);
    }
  }, [t]);

  useEffect(() => {
    load();
  }, [load]);

  const persist = useCallback(
    async (key: string, next: boolean, previous: boolean, apply: (v: boolean) => void) => {

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/app/(dashboard)/dashboard/cli-code/components/CliProfileAutoSyncToggles.tsx:34 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/0c62fe1228ced799. Report an issue: GitHub.