diegosouzapw/OmniRoute · error · Error
settings save failed
Error message
settings save failed
What it means
Bare save sentinel in the modality-bridge video tab's update(): the PATCH to /api/settings carrying the partial video settings returned non-ok, throwing the fixed 'settings save failed'. The optimistic local merge is rolled back toward persistedSettings; the fixed string carries no detail about which field was rejected.
Solutions
- Inspect the PATCH response body for the rejected video setting
- Correct the invalid toggle/model selection and re-apply
- Reload settings if the persisted state may have drifted
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/app/(dashboard)/dashboard/settings/components/modalityBridge/ModalityBridgeVideoTab.tsx:142 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/5a66b3d309b87d43.
Report an issue: GitHub.
Appendix: source
Thrown at src/app/(dashboard)/dashboard/settings/components/modalityBridge/ModalityBridgeVideoTab.tsx:142
setErrorState(null);
})
.catch(() => {
if (!cancelled) setErrorState("load");
});
return () => {
cancelled = true;
};
}, [runtimeHostname]);
const update = async (patch: Partial<VideoState>) => {
setErrorState(null);
try {
const response = await fetch("/api/settings", {
method: "PATCH",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(patch),
});
if (!response.ok) throw new Error("settings save failed");
const saved = persistedSettings.current
? { ...persistedSettings.current, ...patch }
: persistedSettings.current;
persistedSettings.current = saved;
setSettings((previous) => (previous ? { ...previous, ...patch } : previous));
} catch {
setSettings(persistedSettings.current);
setErrorState("save");
}
};
if (errorState === "load") {
return <div role="alert">{tRoot("publicSystem.error.title")}</div>;
}
if (!settings) return null;
const setLocal = (patch: Partial<VideoState>) => {
setSettings((previous) => (previous ? { ...previous, ...patch } : previous));View on GitHub (pinned to a179ffed5b)