{"record":{"id":"e21a5afcfc907cf6","repo":"BoundaryML/baml","slug":"network-error-fetching-url-source","errorCode":null,"errorMessage":"network error fetching {url}: {source}","messagePattern":"network error fetching (.+?): (.+?)","errorType":"exception","errorClass":"FetchError","httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml_release/src/lib.rs","lineNumber":78,"sourceCode":"\n#[derive(Debug, Clone, Copy, PartialEq, Eq)]\npub enum Product {\n    Toolchain,\n    Wrapper,\n}\n\nimpl Product {\n    pub fn tag_prefix(self) -> &'static str {\n        match self {\n            Product::Toolchain => \"baml-language\",\n            Product::Wrapper => \"baml-wrapper\",\n        }\n    }\n}\n\n#[derive(Debug, thiserror::Error)]\npub enum FetchError {\n    #[error(\"network error fetching {url}: {source}\")]\n    Network { url: String, source: reqwest::Error },\n    #[error(\"HTTP {status} fetching {url}\")]\n    HttpStatus {\n        url: String,\n        status: reqwest::StatusCode,\n    },\n    #[error(\"manifest 404 for version {version} (not released yet?)\")]\n    ManifestNotFound { version: String },\n    #[error(\"manifest schema {got} not supported (max {max}); run `baml self-update`\")]\n    ManifestSchemaTooNew { got: u32, max: u32 },\n    #[error(\"target {target} not built for version {version}\")]\n    TargetNotInManifest { target: String, version: String },\n    #[error(\"sha256 mismatch for {url}: expected {expected}, got {got}\")]\n    ChecksumMismatch {\n        url: String,\n        expected: String,\n        got: String,\n    },","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml_release/src/lib.rs#L60-L96","documentation":"FetchError::Network is thrown by baml_release when an HTTP request to the release server (e.g. downloading a release manifest or binary) fails at the transport level. The reqwest::Error source is embedded, and the failing URL is included so the developer can see which endpoint was unreachable. This indicates connectivity/DNS/TLS problems rather than an HTTP error response.","triggerScenarios":"Calling any baml_release fetch/self-update API when the network is down, DNS resolution fails, the TLS handshake fails, or the connection is refused/reset/times out at the reqwest layer.","commonSituations":"Running `baml self-update` behind a corporate proxy that blocks the release host, being offline, a firewall blocking outbound HTTPS, DNS misconfiguration, or the release CDN being temporarily unreachable.","solutions":["Read the embedded reqwest source for the root cause (DNS vs refused vs timeout)","Check basic connectivity: curl the URL from the error message","Configure proxy environment variables (HTTPS_PROXY/HTTP_PROXY) if behind a corporate proxy","Retry after confirming the network is up; transient outages are common","Check status.baml.com or the release host's status page"],"exampleFix":"# before\n$ baml self-update\nnetwork error fetching https://releases.baml.com/manifest.json: dns error\n# after\n$ export HTTPS_PROXY=http://proxy.corp.example:8080\n$ baml self-update","handlingStrategy":"retry","validationCode":"// pre-check connectivity\nlet online = reqwest::blocking::get(\"https://releases.baml.com\").is_ok();\nif !online { eprintln!(\"offline: skipping update check\"); }","typeGuard":"fn is_transport_err(e: &FetchError) -> bool {\n    matches!(e, FetchError::Network { .. })\n}","tryCatchPattern":"match client.fetch_manifest(url) {\n    Err(FetchError::Network { url, source }) => {\n        warn!(\"network error fetching {url}: {source}; retrying with backoff\");\n        retry_with_backoff(3)?\n    }\n    other => other,\n}","preventionTips":["Configure HTTPS_PROXY for corporate networks","Implement exponential backoff for transient failures","Fail fast with a clear message when the machine is offline","Cache the last-known-good manifest to work offline"],"tags":["network","http","rust","reqwest"],"backgroundTag":"network-request-failed","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}