Morganamilo/paru · error

{}: {}

Error message

{}: {}

What it means

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.

Solutions

  1. Note the status code in the message: 404 means wrong arch_url, 5xx means server-side, 429 means rate limited
  2. Check/revert the ArchUrl setting in paru.conf to https://archlinux.org
  3. Verify connectivity: `curl -I https://archlinux.org/feeds/news`
  4. Retry later if it's a transient 5xx/429; disable news fetching in automation if not needed

Example fix

// paru.conf before
[options]
ArchUrl = https://example.com/arch
// after
[options]
ArchUrl = https://archlinux.org
Defensive patterns

Strategy: retry

Validate before calling

let status = reqwest::Client::new()
    .get("https://archlinux.org/feeds/news")
    .send().await?;
if !status.status().is_success() {
    eprintln!("news feed unreachable: {}", status.status());
}

Try / catch

match paru::news(config).await {
    Err(e) if e.to_string().contains("feeds/news") => {
        warn!("news feed unavailable ({}); skipping", e);
    }
    r => r?,
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.

Related errors


AI-assisted analysis of Morganamilo/paru@9ac3578807 (2026-09-12). Data as JSON: /api/errors/76d68566d3348bfb. Report an issue: GitHub.

Appendix: source

Thrown at src/news.rs:38

    let max = config
        .alpm
        .localdb()
        .pkgs()
        .iter()
        .map(|p| p.build_date())
        .max()
        .unwrap_or_default();

    max
}

pub async fn news(config: &Config) -> Result<i32> {
    let url = config.arch_url.join("feeds/news")?;
    let client = config.raur.client();

    let resp = client.get(url.clone()).send().await?;
    if !resp.status().is_success() {
        bail!("{}: {}", url, resp.status());
    }
    let bytes = resp.bytes().await?;
    let channel = Channel::read_from(bytes.as_ref())?;
    let c = config.color;

    let mut printed = false;

    for item in channel.into_items().into_iter().rev() {
        let date = item.pub_date().unwrap_or_default();

        match chrono::DateTime::parse_from_rfc2822(date) {
            Ok(date) => {
                if config.news < 2 && date.timestamp() < newest_pkg(config) {
                    continue;
                }

                print!("{} ", c.news_date.paint(date.format("%F").to_string()));
            }

View on GitHub (pinned to 9ac3578807)