Kuberwastaken/claurst · error

Remote settings: not authorized

Error message

Remote settings: not authorized ({})

What it means

The remote-settings fetch received 401 or 403: the stored credentials were rejected by the settings endpoint. Auth errors are treated as terminal (the formatted status is which of the two), so the fetch is not retried and cached settings remain in effect.

Solutions

  1. Re-authenticate (log in again) to refresh the token, then retry the settings fetch
  2. Verify the token has the required scope for the settings endpoint
  3. Until fixed, the app continues with locally cached/default settings
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src-rust/crates/core/src/remote_settings.rs:221 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/9a5d5667a8136746. Report an issue: GitHub.

Appendix: source

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

            req = req.header("If-None-Match", format!("\"{}\"", cs));
        }

        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");

View on GitHub (pinned to b0637c97ec)