diegosouzapw/OmniRoute · error · Error

settings_load_failed

Error message

settings_load_failed

What it means

Sentinel thrown when GET /api/radar/settings returns non-OK (not 404) while the offers page determines opt-in state. 'settings_load_failed' means the radar settings read failed server-side; offers stay hidden until settings resolve.

Solutions

  1. Reload the page to retry the settings fetch
  2. Check /api/radar/settings handler logs
  3. Verify the radar settings DB table exists (migrations applied)
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/app/(dashboard)/dashboard/radar/offers/page.tsx:100 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/f3e622de08787ecb. Report an issue: GitHub.

Appendix: source

Thrown at src/app/(dashboard)/dashboard/radar/offers/page.tsx:100

      try {
        await loadOffers();
      } catch {
        // The primary error already explains the failed local read.
      }
    } finally {
      setRefreshing(false);
    }
  }, [loadOffers, t]);

  useEffect(() => {
    async function load(): Promise<void> {
      try {
        const response = await fetch("/api/radar/settings");
        if (response.status === 404) {
          setFlagOff(true);
          return;
        }
        if (!response.ok) throw new Error("settings_load_failed");
        const settings = (await response.json()) as SettingsPayload;
        const hasKey = settings.hasSupporterKey === true;
        setHasSupporterKey(hasKey);
        setContributorClaimUrl(
          typeof settings.contributorClaimUrl === "string" ? settings.contributorClaimUrl : null
        );
        setSupporterPlansUrl(
          typeof settings.supporterPlansUrl === "string" ? settings.supporterPlansUrl : null
        );
        if (hasKey) await syncAndLoad();
      } catch {
        setError(t("loadFailed"));
      } finally {
        setLoading(false);
      }
    }
    void load();
  }, [syncAndLoad, t]);

View on GitHub (pinned to a179ffed5b)