janhq/jan · error · UpdateError

No endpoints configured

Error message

No endpoints configured

What it means

UpdateError::NoEndpointsConfigured is returned before any network I/O when the custom updater's endpoint list is empty. It renders exactly 'No endpoints configured' and indicates a configuration problem, not a runtime/network problem.

Solutions

  1. Verify the updater endpoints configuration exists and is non-empty before calling update_check
  2. Check the config file/key that supplies the endpoint list actually loads
  3. Ship sensible default endpoints as fallback in the code
  4. Guard the UI so the update check is disabled when no endpoints are configured

Example fix

// before
let endpoints = load_endpoints()?;
// after
let endpoints = load_endpoints()?;
if endpoints.is_empty() {
    eprintln!("updater: no endpoints configured, skipping check");
    return Ok(None); // or use a default list
}
Defensive patterns

Strategy: validation

Validate before calling

const endpoints = loadEndpoints();
if (!endpoints || endpoints.length === 0) {
  throw new Error('updater misconfigured: no endpoints; fix settings before checking for updates');
}

Type guard

function hasEndpoints(cfg: UpdaterConfig | null): cfg is UpdaterConfig & { endpoints: string[] } {
  return !!cfg && Array.isArray(cfg.endpoints) && cfg.endpoints.length > 0;
}

Prevention

When it happens

Trigger: update_check is invoked while the configured endpoints array is empty or was never loaded (missing config file, config key absent, or empty array from settings).

Common situations: Fresh install without a bundled updater config; user wiped settings; environment-specific config not deployed; a bug clearing the endpoints list after saving preferences.

Understand the failure class

Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.

Related errors


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

Appendix: source

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

/// 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>,
    #[serde(default)]
    pub platforms: Option<serde_json::Value>,
    /// URL to download the update
    #[serde(default)]
    pub url: Option<String>,
    /// Signature for verifying the update

View on GitHub (pinned to 7205d770c1)