diegosouzapw/OmniRoute · error · Error
Failed to remove exact alias
Error message
Failed to remove exact alias
What it means
removeExactAlias' DELETE to /api/settings/model-aliases ({from}) returned non-OK; 'Failed to remove exact alias' is thrown. Same shape as the add path: the catch converts it to the localized errorOccurred status message.
Solutions
- Refresh the alias list — it may already be removed
- Retry the delete
- Check model-aliases endpoint logs if it persists
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/app/(dashboard)/dashboard/settings/components/ModelAliasesUnified.tsx:97 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/242c09c1a417cbae.
Report an issue: GitHub.
Appendix: source
Thrown at src/app/(dashboard)/dashboard/settings/components/ModelAliasesUnified.tsx:97
setToValue("");
showStatus("success", translateOrFallback(t, "saved", "Saved"));
} catch (error) {
console.error("Failed to save exact alias:", error);
showStatus("error", translateOrFallback(t, "errorOccurred", "An error occurred"));
} finally {
setSaving(false);
}
};
const removeExactAlias = async (from: string) => {
setSaving(true);
try {
const res = await fetch("/api/settings/model-aliases", {
method: "DELETE",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ from }),
});
if (!res.ok) throw new Error("Failed to remove exact alias");
const data = await res.json();
setCustomAliases(data.custom || {});
showStatus("success", translateOrFallback(t, "saved", "Saved"));
} catch (error) {
console.error("Failed to remove exact alias:", error);
showStatus("error", translateOrFallback(t, "errorOccurred", "An error occurred"));
} finally {
setSaving(false);
}
};
const addWildcardAlias = async () => {
if (!fromValue.trim() || !toValue.trim()) return;
setSaving(true);
try {
const settingsRes = await fetch("/api/settings", { cache: "no-store" });
if (!settingsRes.ok) throw new Error("Failed to load current settings");
const settingsData = await settingsRes.json();View on GitHub (pinned to a179ffed5b)