{"record":{"id":"5c904b9019311bbc","repo":"Zackriya-Solutions/meetily","slug":"failed-to-create-http-client-5c904b","errorCode":null,"errorMessage":"Failed to create HTTP client: {}","messagePattern":"Failed to create HTTP client: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/summary/summary_engine/model_manager.rs","lineNumber":479,"sourceCode":"\n        // Check for existing partial download to resume\n        let existing_size: u64 = if file_path.exists() {\n            fs::metadata(&file_path)\n                .await\n                .map(|m| m.len())\n                .unwrap_or(0)\n        } else {\n            0\n        };\n\n        // Download the file with optimized client settings\n        let client = Client::builder()\n            .tcp_nodelay(true) // Disable Nagle's algorithm for faster streaming\n            .pool_max_idle_per_host(1) // Keep connection alive\n            .timeout(Duration::from_secs(3600)) // 1 hour timeout for large files\n            .connect_timeout(Duration::from_secs(30))\n            .build()\n            .map_err(|e| anyhow!(\"Failed to create HTTP client: {}\", e))?;\n\n        // Build request with Range header if resuming\n        let mut request = client.get(&model_def.download_url);\n        if existing_size > 0 {\n            log::info!(\n                \"Resuming download from byte {} ({:.1} MB)\",\n                existing_size,\n                existing_size as f64 / (1024.0 * 1024.0)\n            );\n            request = request.header(\"Range\", format!(\"bytes={}-\", existing_size));\n        }\n\n        let response = request\n            .send()\n            .await\n            .map_err(|e| anyhow!(\"Failed to start download: {}\", e))?;\n\n        // Check response status - 200 OK (full download) or 206 Partial Content (resume)","sourceCodeStart":461,"sourceCodeEnd":497,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/0281737d87d26352fb0adc78c8c0975f691b23d1/frontend/src-tauri/src/summary/summary_engine/model_manager.rs#L461-L497","documentation":"reqwest's Client::builder() (tcp_nodelay, 1-hour total timeout, 30 s connect timeout) failed to build. Builder failures are configuration-level — most commonly TLS backend initialization (missing CA store) — and no request is ever attempted.","triggerScenarios":"TLS roots cannot be initialized in a minimal/stripped container; conflicting TLS feature flags producing two reqwest backends; resource exhaustion preventing allocator or runtime setup.","commonSituations":"Running the binary in a scratch Docker image without CA certificates; cargo feature changes to reqwest's TLS backends between builds; heavily memory-constrained machines where TLS init fails.","solutions":["Log the builder error — it names the TLS/config cause","Install CA certificates (ca-certificates package) in containers, or pin one TLS backend via reqwest features (e.g. rustls-tls)","Run cargo tree -i reqwest to detect duplicate TLS backends after dependency changes","A single retry at startup can mask transient init failure, but repeated failures indicate a build/env defect"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"match download_result {\n    Err(e) if e.to_string().starts_with(\"Failed to create HTTP client\") => {\n        // TLS/config-level: report env problem (CA store, TLS backend) — do not loop-retry\n        report_environment_issue(&e);\n    }\n    other => other,\n}","preventionTips":["Pin a single TLS backend in Cargo features (e.g. reqwest rustls-tls) to avoid dual-backend builds","Ensure CA certificates exist in deployment images (install ca-certificates)","Run cargo tree -i reqwest after dependency upgrades to catch duplicate TLS stacks"],"tags":["http","tls","client","rust"],"backgroundTag":"http-client-build-failed","analyzedSha":"0281737d87d26352fb0adc78c8c0975f691b23d1","analyzedAt":"2026-08-16T20:57:52.567Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}