Kuberwastaken/claurst · error

Remote settings: unexpected status

Error message

Remote settings: unexpected status {}

What it means

The remote-settings endpoint returned a status outside the handled set (304/204/404/200/401/403) — the formatted code is the unclassified status, typically a 5xx or proxy error. The fetch aborts so the retry wrapper can decide whether to try again.

Solutions

  1. Let the retry wrapper re-fetch; transient 5xx responses usually clear
  2. Check the settings API base URL and network path if the status persists
  3. Cached settings remain in use until a fetch succeeds
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src-rust/crates/core/src/remote_settings.rs:224 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Kuberwastaken/claurst@b0637c97ec (2026-09-10). Data as JSON: /api/errors/add473a99d2a0d75. Report an issue: GitHub.

Appendix: source

Thrown at src-rust/crates/core/src/remote_settings.rs:224

        let resp = req.send().await?;
        let status = resp.status().as_u16();

        match status {
            304 => {
                debug!("Remote settings: 304 Not Modified — cache still valid");
                return Ok(None);
            }
            204 | 404 => {
                debug!("Remote settings: {} — no settings configured", status);
                return Ok(Some(Value::Object(Default::default())));
            }
            200 => {}
            401 | 403 => {
                // Auth errors are terminal — no point retrying
                anyhow::bail!("Remote settings: not authorized ({})", status);
            }
            other => {
                anyhow::bail!("Remote settings: unexpected status {}", other);
            }
        }

        let body: Value = resp.json().await?;

        // Try to parse as the expected response shape, but be permissive —
        // accept raw settings object if the wrapper is missing.
        let (settings, _checksum) = if let Ok(parsed) =
            serde_json::from_value::<RemoteSettingsResponse>(body.clone())
        {
            (parsed.settings, parsed.checksum)
        } else if body.is_object() {
            (body, None)
        } else {
            anyhow::bail!("Remote settings: unexpected response shape");
        };

        Ok(Some(settings))

View on GitHub (pinned to b0637c97ec)