tonhowtf/omniget · error · anyhow::Error

o feed de @ não trouxe nenhuma história publicada

Error message

o feed de @{} não trouxe nenhuma história publicada

What it means

When falling back to the public Medium RSS feed, run() parses the feed and requires at least one published story. If parse_feed returns zero items for the user, it throws this error rather than exporting an empty result set.

Solutions

  1. Confirm the Medium username actually has publicly published stories by opening the feed URL in a browser
  2. Log in via cookies so from_session can export drafts and session stories instead of relying on the public feed
  3. Check the username spelling/handle
  4. Try again later in case the feed was temporarily empty
Defensive patterns

Strategy: try-catch

Validate before calling

let xml = fetcher.get_text(&feed_url(&user)).await?;
if parse_feed(&xml).is_empty() {
    // warn or fall back before exporting
}

Try / catch

match run(&opts, progress).await {
    Err(e) if e.to_string().contains("nenhuma história publicada") => {
        tracing::warn!("usuário sem histórias públicas: {}", user);
    }
    other => other?,
}

Prevention

When it happens

Trigger: opts.user is set and docs was empty, fetcher.get_text(feed_url(&user)) succeeded, but parse_feed(&xml) produced an empty items list.

Common situations: The username exists but has no public stories; the account is new or all stories are drafts (drafts only visible via session/cookies); Medium returned an empty or invalid feed for the handle (renamed/deleted account).

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/1a47226fa5f6cbe9. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/omniget-core/src/core/tools/blogs/medium.rs:672

                note = Some(format!(
                    "a sessão do Medium não respondeu ({}); saiu o que o feed público entrega",
                    e
                ));
            }
        }
    }

    if docs.is_empty() {
        if user.is_empty() {
            return Err(anyhow!(
                "informe o seu usuário do Medium (ou capture os cookies de medium.com no gerenciador para incluir os rascunhos)"
            ));
        }
        crate::core::tools::report(&progress, ID, "feed", 0, None, Some(user.clone()));
        let xml = fetcher.get_text(&feed_url(&user)).await?;
        let items = parse_feed(&xml);
        if items.is_empty() {
            return Err(anyhow!(
                "o feed de @{} não trouxe nenhuma história publicada",
                user
            ));
        }
        for it in items {
            docs.push(doc_from_feed(&it, "Medium"));
        }
    }

    if opts.limit > 0 && docs.len() > opts.limit {
        docs.truncate(opts.limit);
    }

    let mut out = ExportResult {
        used_session: fetcher.has_session(),
        source: source.to_string(),
        user: user.clone(),
        dest: root.to_string_lossy().to_string(),

View on GitHub (pinned to 8600b91f42)