{"record":{"id":"5089a438bc7563ba","repo":"janhq/jan","slug":"no-endpoints-configured","errorCode":null,"errorMessage":"No endpoints configured","messagePattern":"No endpoints configured","errorType":"error_code","errorClass":"UpdateError","httpStatus":null,"severity":"error","filePath":"src-tauri/src/core/updater/custom_updater.rs","lineNumber":43,"sourceCode":"\n/// Timeout for HTTP requests\nconst REQUEST_TIMEOUT_SECS: u64 = 30;\n\n#[derive(Debug, Error)]\npub enum UpdateError {\n    #[error(\"HTTP request failed: {0}\")]\n    RequestFailed(#[from] reqwest::Error),\n\n    #[error(\"Failed to parse update response: {0}\")]\n    ParseError(String),\n\n    #[error(\"All endpoints failed\")]\n    AllEndpointsFailed,\n\n    #[error(\"Invalid response from server: {0}\")]\n    InvalidResponse(String),\n\n    #[error(\"No endpoints configured\")]\n    NoEndpointsConfigured,\n}\n\n/// Update information returned by the update check endpoint\n/// Compatible with Tauri's updater format\n#[derive(Debug, Clone, Serialize, Deserialize)]\npub struct UpdateInfo {\n    pub version: String,\n    #[serde(default)]\n    pub notes: Option<String>,\n    #[serde(default)]\n    pub pub_date: Option<String>,\n    #[serde(default)]\n    pub platforms: Option<serde_json::Value>,\n    /// URL to download the update\n    #[serde(default)]\n    pub url: Option<String>,\n    /// Signature for verifying the update","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/janhq/jan/blob/7205d770c1e097c3daf35a911176410e93bc5564/src-tauri/src/core/updater/custom_updater.rs#L25-L61","documentation":"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.","triggerScenarios":"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).","commonSituations":"Fresh install without a bundled updater config; user wiped settings; environment-specific config not deployed; a bug clearing the endpoints list after saving preferences.","solutions":["Verify the updater endpoints configuration exists and is non-empty before calling update_check","Check the config file/key that supplies the endpoint list actually loads","Ship sensible default endpoints as fallback in the code","Guard the UI so the update check is disabled when no endpoints are configured"],"exampleFix":"// before\nlet endpoints = load_endpoints()?;\n// after\nlet endpoints = load_endpoints()?;\nif endpoints.is_empty() {\n    eprintln!(\"updater: no endpoints configured, skipping check\");\n    return Ok(None); // or use a default list\n}","handlingStrategy":"validation","validationCode":"const endpoints = loadEndpoints();\nif (!endpoints || endpoints.length === 0) {\n  throw new Error('updater misconfigured: no endpoints; fix settings before checking for updates');\n}","typeGuard":"function hasEndpoints(cfg: UpdaterConfig | null): cfg is UpdaterConfig & { endpoints: string[] } {\n  return !!cfg && Array.isArray(cfg.endpoints) && cfg.endpoints.length > 0;\n}","tryCatchPattern":null,"preventionTips":["Ship default endpoints in the app bundle","Validate the updater config at startup, not at update time","Never allow settings UI to save an empty endpoint list","Disable update-check UI when configuration is incomplete"],"tags":["configuration","updater","rust","missing-config"],"backgroundTag":"missing-required-config","analyzedSha":"7205d770c1e097c3daf35a911176410e93bc5564","analyzedAt":"2026-09-17T14:27:30.100Z","contentChangedAt":"2026-09-17T14:27:30.100Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}