janhq/jan · error · UpdateError

All endpoints failed

Error message

All endpoints failed

What it means

UpdateError::AllEndpointsFailed is the terminal error of the custom updater's fallback loop: every configured update endpoint was tried and each failed (network error, parse error, or invalid response). It carries no payload and renders exactly 'All endpoints failed'.

Solutions

  1. Check connectivity to each configured update endpoint individually
  2. Verify the endpoints list contains correct, reachable URLs
  3. Improve diagnosability by logging/propagating the last per-endpoint error instead of collapsing
  4. Add a working fallback endpoint to the configuration

Example fix

// before
return Err(UpdateError::AllEndpointsFailed);
// after
return Err(UpdateError::AllEndpointsFailed); // also log last_err per endpoint for diagnosis
Defensive patterns

Strategy: fallback

Validate before calling

// pre-check all endpoints before running the update loop
for (const ep of endpoints) {
  const ok = await fetch(ep, { method: 'HEAD' }).then(r => r.ok).catch(() => false);
  if (ok) break;
}

Try / catch

match updater.check() {
    Err(UpdateError::AllEndpointsFailed) => {
        // notify user all mirrors unreachable; schedule background retry
    }
    other => other?,
}

Prevention

When it happens

Trigger: update_check iterates the configured endpoint list; after the last endpoint returns an error, instead of returning the last cause it collapses into AllEndpointsFailed.

Common situations: All update mirrors offline or firewalled; endpoints list misconfigured with wrong hosts; DNS or proxy failures affecting every host; certificate expiry across mirrors.

Understand the failure class

Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.

Related errors


AI-assisted analysis of janhq/jan@7205d770c1 (2026-09-17). Data as JSON: /api/errors/0c3626749742debe. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/src/core/updater/custom_updater.rs:37

/// - In CI: Set JAN_SIGNING_KEY environment variable at build time
/// - In local dev: Falls back to a test key
pub(crate) const SECRET_KEY: &str = match option_env!("JAN_SIGNING_KEY") {
    Some(key) => key,
    None => "local-dev-test-key-not-for-production",
};

/// Timeout for HTTP requests
const REQUEST_TIMEOUT_SECS: u64 = 30;

#[derive(Debug, Error)]
pub enum UpdateError {
    #[error("HTTP request failed: {0}")]
    RequestFailed(#[from] reqwest::Error),

    #[error("Failed to parse update response: {0}")]
    ParseError(String),

    #[error("All endpoints failed")]
    AllEndpointsFailed,

    #[error("Invalid response from server: {0}")]
    InvalidResponse(String),

    #[error("No endpoints configured")]
    NoEndpointsConfigured,
}

/// Update information returned by the update check endpoint
/// Compatible with Tauri's updater format
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct UpdateInfo {
    pub version: String,
    #[serde(default)]
    pub notes: Option<String>,
    #[serde(default)]
    pub pub_date: Option<String>,

View on GitHub (pinned to 7205d770c1)