tinyhumansai/openhuman · error · anyhow::Error
GMAIL_FETCH_EMAILS (direct) failed
Error message
GMAIL_FETCH_EMAILS (direct) failed: {e:#} What it means
The same GMAIL_FETCH_EMAILS search executed through the direct-tenant Composio client (user with a stored API key, no backend proxy) failed. Direct-mode calls hit Composio directly, so this usually means an expired/invalid API key, an unconnected Gmail app, or a Composio-side error.
Solutions
- Refresh the stored Composio API key and confirm the Gmail app is connected for that direct tenant
- Retry after re-establishing the direct connection on app.composio.dev
- Fall back to backend mode or skip the Gmail stage if direct mode keeps failing
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/openhuman/agent/learning/linkedin_enrichment.rs:549 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/b35a3eb1f4c96fbc.
Report an issue: GitHub.
Appendix: source
Thrown at src/openhuman/agent/learning/linkedin_enrichment.rs:549
});
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());
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.View on GitHub (pinned to 7491200858)