diegosouzapw/OmniRoute · error · Error
combo-defaults patch failed
Error message
combo-defaults patch failed
What it means
Bare sentinel from patchComboDefaultsStrategy(): the PATCH to /api/settings/combo-defaults with { comboDefaults: { strategy } } returned non-ok. It only signals that the default combo strategy was not updated — typically an unknown strategy name or a settings write failure; the reason is not embedded in the message.
Solutions
- Confirm the strategy is one of the supported public combo strategies
- Check the response body/server logs for the rejection reason
- Retry the strategy switch afterwards
Defensive patterns
Strategy: try-catch
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.
Appendix: 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)