{"record":{"id":"76d68566d3348bfb","repo":"Morganamilo/paru","slug":"news","errorCode":null,"errorMessage":"{}: {}","messagePattern":"\\{\\}: \\{\\}","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/news.rs","lineNumber":38,"sourceCode":"    let max = config\n        .alpm\n        .localdb()\n        .pkgs()\n        .iter()\n        .map(|p| p.build_date())\n        .max()\n        .unwrap_or_default();\n\n    max\n}\n\npub async fn news(config: &Config) -> Result<i32> {\n    let url = config.arch_url.join(\"feeds/news\")?;\n    let client = config.raur.client();\n\n    let resp = client.get(url.clone()).send().await?;\n    if !resp.status().is_success() {\n        bail!(\"{}: {}\", url, resp.status());\n    }\n    let bytes = resp.bytes().await?;\n    let channel = Channel::read_from(bytes.as_ref())?;\n    let c = config.color;\n\n    let mut printed = false;\n\n    for item in channel.into_items().into_iter().rev() {\n        let date = item.pub_date().unwrap_or_default();\n\n        match chrono::DateTime::parse_from_rfc2822(date) {\n            Ok(date) => {\n                if config.news < 2 && date.timestamp() < newest_pkg(config) {\n                    continue;\n                }\n\n                print!(\"{} \", c.news_date.paint(date.format(\"%F\").to_string()));\n            }","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/Morganamilo/paru/blob/9ac3578807a87858651e81a02586ceb947686e7c/src/news.rs#L20-L56","documentation":"paru's news command fetches the Arch Linux news RSS feed (config.arch_url joined with 'feeds/news') over HTTP. If the response status is not a success (4xx/5xx), it bails with '<url>: <status>', surfacing the exact URL and HTTP status code so the user can see whether it's a server, proxy, or connectivity problem.","triggerScenarios":"Running `paru -Pn`/news when client.get(url).send() succeeds at transport level but resp.status().is_success() is false — e.g. 404 from a wrong arch_url, 403/429 from a blocking CDN/proxy, or 5xx from archlinux.org.","commonSituations":"Corporate proxies or captive portals returning error pages; mirrored/changed arch_url in paru.conf; temporary archlinux.org outages or rate limiting; DNS hijacks returning 4xx.","solutions":["Note the status code in the message: 404 means wrong arch_url, 5xx means server-side, 429 means rate limited","Check/revert the ArchUrl setting in paru.conf to https://archlinux.org","Verify connectivity: `curl -I https://archlinux.org/feeds/news`","Retry later if it's a transient 5xx/429; disable news fetching in automation if not needed"],"exampleFix":"// paru.conf before\n[options]\nArchUrl = https://example.com/arch\n// after\n[options]\nArchUrl = https://archlinux.org","handlingStrategy":"retry","validationCode":"let status = reqwest::Client::new()\n    .get(\"https://archlinux.org/feeds/news\")\n    .send().await?;\nif !status.status().is_success() {\n    eprintln!(\"news feed unreachable: {}\", status.status());\n}","typeGuard":null,"tryCatchPattern":"match paru::news(config).await {\n    Err(e) if e.to_string().contains(\"feeds/news\") => {\n        warn!(\"news feed unavailable ({}); skipping\", e);\n    }\n    r => r?,\n}","preventionTips":["Keep ArchUrl in paru.conf pointing at https://archlinux.org","Retry with backoff for transient 5xx/429","Skip news fetching in non-interactive automation"],"tags":["network","http","news","arch"],"backgroundTag":"http-error-response","analyzedSha":"9ac3578807a87858651e81a02586ceb947686e7c","analyzedAt":"2026-09-12T04:57:59.861Z","contentChangedAt":"2026-09-12T04:57:59.861Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}