diegosouzapw/OmniRoute · error · Error

combo-defaults patch failed

Error message

combo-defaults patch failed

What it means

Error "combo-defaults patch failed" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/app/(dashboard)/dashboard/settings/components/RoutingStrategyCard.tsx:32

type Translate = ReturnType<typeof useTranslations>;

async function patchSettings(body: Record<string, unknown>) {
  const res = await fetch("/api/settings", {
    method: "PATCH",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(body),
  });
  if (!res.ok) throw new Error("settings patch failed");
  return res.json();
}

async function patchComboDefaultsStrategy(strategy: string) {
  const res = await fetch("/api/settings/combo-defaults", {
    method: "PATCH",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ comboDefaults: { strategy } }),
  });
  if (!res.ok) throw new Error("combo-defaults patch failed");
}

function numericLimit(value: number | string | undefined, fallback: number): number {
  const n = typeof value === "number" ? value : parseInt(String(value), 10);
  return Number.isFinite(n) ? n : fallback;
}

/** Loads/persists the routing-strategy settings and tracks loading/busy state.
 * Extracted out of the component body to keep RoutingStrategyCard's own render
 * function under the complexity/size gate. */
function useRoutingStrategySettings() {
  const [settings, setSettings] = useState<RoutingSettings>({
    fallbackStrategy: "fill-first",
    stickyRoundRobinLimit: 3,
    comboStrategy: "fallback",
    comboStickyRoundRobinLimit: 1,
  });
  const [loading, setLoading] = useState(true);

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/app/(dashboard)/dashboard/settings/components/RoutingStrategyCard.tsx:32 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/18295f44886c7dce. Report an issue: GitHub.