diegosouzapw/OmniRoute · error · Error
data?.error?.message || data?.error || "Failed to update…
Error message
data?.error?.message || data?.error || "Failed to update anonymous fallback setting"
What it means
Thrown when PATCH /api/settings with noAuthFallbackDisabledProviders fails while toggling anonymous fallback for a provider. The UI already applied the optimistic update; this error means the server rejected the write (validation, auth, or DB failure).
Solutions
- Re-toggle the switch to re-send the PATCH
- Verify the settings payload passes server-side Zod validation
- Reload the page to resync the optimistic local state with the server
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/app/(dashboard)/dashboard/providers/[id]/components/AnonymousFallbackToggle.tsx:103 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/b36fc894416c42ea.
Report an issue: GitHub.
Appendix: source
Thrown at src/app/(dashboard)/dashboard/providers/[id]/components/AnonymousFallbackToggle.tsx:103
async (nextEnabled: boolean) => {
const previous = disabledProviders;
const next = computeNoAuthFallbackDisabledProviders(
previous,
providerId,
providerAlias,
!nextEnabled
);
setDisabledProviders(next);
setSaving(true);
try {
const response = await fetch("/api/settings", {
method: "PATCH",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ noAuthFallbackDisabledProviders: next }),
});
const data = await response.json().catch(() => ({}));
if (!response.ok) {
throw new Error(
data?.error?.message ||
data?.error ||
providerText(
t,
"anonymousFallbackUpdateFailed",
"Failed to update anonymous fallback setting"
)
);
}
setDisabledProviders(
Array.isArray(data.noAuthFallbackDisabledProviders)
? data.noAuthFallbackDisabledProviders
: next
);
notify.success(
nextEnabled
? providerText(
t,View on GitHub (pinned to a179ffed5b)