tinyhumansai/openhuman · error · anyhow::Error

GMAIL_FETCH_EMAILS failed

Error message

GMAIL_FETCH_EMAILS failed: {e:#}

What it means

The Composio GMAIL_FETCH_EMAILS tool call (backend-proxied tenant) returned an error while searching for LinkedIn notification emails — connection not established, Composio/backend auth failure, or Gmail API error. The Gmail stage of profile enrichment fails; the regex over decoded HTML bodies never runs.

Solutions

  1. Reconnect the Gmail integration on the Composio dashboard and retry
  2. Check the backend session is valid (sign in again) and the Composio connection is healthy
  3. Treat a missing profile URL from Gmail as non-fatal and let the pipeline continue via other stages
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/openhuman/agent/learning/linkedin_enrichment.rs:536 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/3cba8bc3cd9bb277. Report an issue: GitHub.

Appendix: source

Thrown at src/openhuman/agent/learning/linkedin_enrichment.rs:536

    // direct-mode users even when their LinkedIn/Gmail connections
    // were healthy on app.composio.dev.
    let client_kind = create_composio_client(config)
        .map_err(|e| anyhow::anyhow!("composio client unavailable: {e}"))?;

    // `comm/in/<username>` — LinkedIn's own notification emails always use
    // this form to refer to the email *recipient's* profile.
    static COMM_RE: LazyLock<Regex> =
        LazyLock::new(|| Regex::new(r"linkedin\.com/comm/in/([a-zA-Z0-9_-]+)").unwrap());

    let args = json!({
        "query": "from:linkedin.com",
        "max_results": 10,
    });
    let resp = match &client_kind {
        ComposioClientKind::Backend(client) => client
            .execute_tool("GMAIL_FETCH_EMAILS", Some(args))
            .await
            .map_err(|e| anyhow::anyhow!("GMAIL_FETCH_EMAILS failed: {e:#}"))?,
        ComposioClientKind::Direct(direct) => {
            tracing::debug!(
                "[linkedin_enrichment][composio-direct] GMAIL_FETCH_EMAILS via direct tenant"
            );
            direct_execute(
                direct,
                "GMAIL_FETCH_EMAILS",
                Some(args),
                &config.composio.entity_id,
                None,
            )
            .await
            .map_err(|e| anyhow::anyhow!("GMAIL_FETCH_EMAILS (direct) failed: {e:#}"))?
        }
    };

    if !resp.successful {
        let err = resp.error.unwrap_or_else(|| "unknown error".into());

View on GitHub (pinned to 7491200858)