tinyhumansai/openhuman · error

GMAIL_FETCH_EMAILS error

Error message

GMAIL_FETCH_EMAILS error: {err}

What it means

The LinkedIn enrichment flow executes the Composio GMAIL_FETCH_EMAILS action (via the standard path or the direct fallback); the action completed at transport level but its response carried successful=false, and the response's error string ('unknown error' when absent) is bailed with the GMAIL_FETCH_EMAILS prefix. This is the integration or backend rejecting or failing the action - not a network failure in this client, which surfaces a different message for the direct path.

Solutions

  1. Read the embedded error text - it is Composio's own failure reason.
  2. Verify the Composio connection state and re-authenticate Gmail if expired.
  3. Confirm config.composio.entity_id points at the right entity.
  4. For transient upstream failures retry later; narrow the fetch window if timeouts recur.
Defensive patterns

Strategy: fallback

Try / catch

Wrap the enrichment call; on failure log a warning with the embedded Composio error and continue the flow without enrichment data - the LinkedIn enrichment is best-effort and should not abort the surrounding operation.

Prevention

When it happens

Trigger: The user's Composio Gmail connection expired or was revoked; config.composio.entity_id is stale or wrong; quota or timeout inside Composio or upstream Gmail; the action arguments were rejected by the integration.

Common situations: A user disconnected Gmail after onboarding and the enrichment flow still runs; a stale composio.entity_id after workspace changes; large mailboxes timing out the fetch.

Related errors


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

Appendix: source

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

        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());
        anyhow::bail!("GMAIL_FETCH_EMAILS error: {err}");
    }

    // Walk the messages, decode HTML parts, and search for profile URLs.
    let messages = resp
        .data
        .get("messages")
        .and_then(|v| v.as_array())
        .cloned()
        .unwrap_or_default();

    for msg in &messages {
        // Collect all text to search: plain messageText + decoded HTML parts.
        let mut searchable = String::new();

        // Plain text body (already decoded by Composio).
        if let Some(text) = msg.get("messageText").and_then(|v| v.as_str()) {
            searchable.push_str(text);
            searchable.push('\n');

View on GitHub (pinned to 7491200858)