diegosouzapw/OmniRoute · error · Error
Failed to save provider tier override
Error message
Failed to save provider tier override (${res.status}) What it means
saveProviderTierOverride PUT /api/settings/tier-config returned a non-OK status, so the per-provider tier override could not be persisted. This is a dashboard client-side error wrapper carrying the HTTP status for the settings form to display.
Solutions
- Show the status to the user and keep the form in its previous state
- Check auth/JWT expiry on 401 and redirect to login
- Retry on 5xx; investigate the route for validation rejects on 400
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/app/(dashboard)/dashboard/providers/[id]/components/modals/providerTierFieldApi.ts:47 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/4138716c4083faa5.
Report an issue: GitHub.
Appendix: source
Thrown at src/app/(dashboard)/dashboard/providers/[id]/components/modals/providerTierFieldApi.ts:47
const config = (await res.json()) as TierConfig;
const match = config.providerOverrides?.find(
(o) => o.provider.toLowerCase() === provider.toLowerCase()
);
return normalizeTierValue(match?.tier);
}
/** Set (or clear, when `tier === ""`) the tier override for `provider`. */
export async function saveProviderTierOverride(
provider: string,
tier: ProviderTier | ""
): Promise<void> {
const res = await fetch("/api/settings/tier-config", {
method: "PUT",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ provider, tier: tier === "" ? null : tier }),
});
if (!res.ok) {
throw new Error(`Failed to save provider tier override (${res.status})`);
}
}
View on GitHub (pinned to a179ffed5b)