diegosouzapw/OmniRoute · error · Error
errorData.error?.message || t("failedSaveCustomModel")
Error message
errorData.error?.message || t("failedSaveCustomModel") What it means
Error "errorData.error?.message || t("failedSaveCustomModel")" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/app/(dashboard)/dashboard/providers/[id]/components/CompatibleModelsSection.tsx:290
const customModelRes = await fetch("/api/provider-models", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
provider: providerStorageAlias,
modelId,
modelName: modelId,
source: "manual",
}),
});
if (!customModelRes.ok) {
let errorData: { error?: { message?: string } } = {};
try {
errorData = await customModelRes.json();
} catch (jsonError) {
console.error("Failed to parse error response from custom model API:", jsonError);
}
throw new Error(errorData.error?.message || t("failedSaveCustomModel"));
}
// Only create alias after customModel is saved successfully
await onSetAlias(modelId, resolvedAlias, providerStorageAlias);
setNewModel("");
notify.success(t("modelAddedSuccess", { modelId }));
onModelsChanged?.();
} catch (error) {
console.error("Error adding model:", error);
notify.error(error instanceof Error ? error.message : t("failedAddModelTryAgain"));
} finally {
setAdding(false);
}
};
const handleImport = async () => {
if (!allowImport || importing) return;
const activeConnection = connections.find((conn) => conn.isActive !== false);View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/app/(dashboard)/dashboard/providers/[id]/components/CompatibleModelsSection.tsx:290 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/71d34d00b8c7c8d1.
Report an issue: GitHub.