{"record":{"id":"e7f4cb1778316daf","repo":"cjpais/Handy","slug":"download-failed-from-hugging-face-and-mirr","errorCode":null,"errorMessage":"Download failed from Hugging Face ({}) and {} mirror(s)","messagePattern":"Download failed from Hugging Face \\((.+?)\\) and (.+?) mirror\\(s\\)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/src/managers/model.rs","lineNumber":2096,"sourceCode":"                {\n                    Ok(true) => {\n                        completed = true;\n                        break;\n                    }\n                    Ok(false) => {\n                        info!(\"Mirror download cancelled for: {}\", model_id);\n                        return Ok(());\n                    }\n                    Err(e) => {\n                        warn!(\n                            \"Mirror download failed for {} from {}: {:?}\",\n                            model_id, mirror.url, e\n                        );\n                    }\n                }\n            }\n            if !completed {\n                return Err(anyhow::anyhow!(\n                    \"Download failed from Hugging Face ({}) and {} mirror(s)\",\n                    hf_error,\n                    mirrors.len()\n                ));\n            }\n        }\n\n        cleanup.disarmed = true;\n        self.update_download_status()?;\n        self.cancel_flags.lock().unwrap().remove(&model_id);\n        let _ = self.app_handle.emit(\"model-download-complete\", &model_id);\n        info!(\"HF model {} downloaded\", model_id);\n        Ok(())\n    }\n\n    /// Direct-HTTP download of a catalog model's file from a mirror into the\n    /// models dir (HF-model resolution accepts that location too). Returns\n    /// `Ok(true)` on completion, `Ok(false)` if cancelled (partial kept).","sourceCodeStart":2078,"sourceCodeEnd":2114,"githubUrl":"https://github.com/cjpais/Handy/blob/98a4d80cce8ad41efec2a419b59d9e81229a35d7/src-tauri/src/managers/model.rs#L2078-L2114","documentation":"The last-resort error after Hugging Face failed AND every mirror from catalog::mirror_fallbacks also failed (each mirror failure is logged as 'Mirror download failed ... {url}'). This closes the entire download flow for the model with both the HF cause ({hf_error}) and the mirror count.","triggerScenarios":"All egress blocked or broken: HF unreachable and blob.handy.computer (the mirror host) also unreachable; proxies/firewalls blocking both hosts; disk-full causing writes to fail on every source; TLS issues affecting all endpoints.","commonSituations":"Fully offline or firewalled environments; captive portals; proxy outages; system clock skew breaking TLS on every host simultaneously.","solutions":["Check the warn! logs above this error — each mirror's {:?} failure is recorded with its URL","Verify both huggingface.co and blob.handy.computer are reachable (curl -I)","Check local disk space and write permissions on the models directory","If the network is fine, check system clock (TLS cert validation) and proxy config","Retry when the network recovers; partial files resume automatically"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// terminal error — surface hf_error plus each mirror's warn log; only user action (network fix) unblocks\nreturn Err(anyhow::anyhow!(\"Download failed from Hugging Face ({}) and {} mirror(s)\", hf_error, mirrors.len()));","preventionTips":["Verify reachability of both huggingface.co and blob.handy.computer before downloads","Keep the mirror list in catalog::mirror_fallbacks current so fallback has somewhere to go","Ensure disk space for the uncompressed model size, not just the download"],"tags":["rust","download","network","mirror-fallback","exhausted-retries"],"backgroundTag":"model-download-failed","analyzedSha":"98a4d80cce8ad41efec2a419b59d9e81229a35d7","analyzedAt":"2026-08-16T20:58:09.966Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}