{"record":{"id":"3cba8bc3cd9bb277","repo":"tinyhumansai/openhuman","slug":"gmail-fetch-emails-failed-e","errorCode":null,"errorMessage":"GMAIL_FETCH_EMAILS failed: {e:#}","messagePattern":"GMAIL_FETCH_EMAILS failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/learning/linkedin_enrichment.rs","lineNumber":536,"sourceCode":"    // direct-mode users even when their LinkedIn/Gmail connections\n    // were healthy on app.composio.dev.\n    let client_kind = create_composio_client(config)\n        .map_err(|e| anyhow::anyhow!(\"composio client unavailable: {e}\"))?;\n\n    // `comm/in/<username>` — LinkedIn's own notification emails always use\n    // this form to refer to the email *recipient's* profile.\n    static COMM_RE: LazyLock<Regex> =\n        LazyLock::new(|| Regex::new(r\"linkedin\\.com/comm/in/([a-zA-Z0-9_-]+)\").unwrap());\n\n    let args = json!({\n        \"query\": \"from:linkedin.com\",\n        \"max_results\": 10,\n    });\n    let resp = match &client_kind {\n        ComposioClientKind::Backend(client) => client\n            .execute_tool(\"GMAIL_FETCH_EMAILS\", Some(args))\n            .await\n            .map_err(|e| anyhow::anyhow!(\"GMAIL_FETCH_EMAILS failed: {e:#}\"))?,\n        ComposioClientKind::Direct(direct) => {\n            tracing::debug!(\n                \"[linkedin_enrichment][composio-direct] GMAIL_FETCH_EMAILS via direct tenant\"\n            );\n            direct_execute(\n                direct,\n                \"GMAIL_FETCH_EMAILS\",\n                Some(args),\n                &config.composio.entity_id,\n                None,\n            )\n            .await\n            .map_err(|e| anyhow::anyhow!(\"GMAIL_FETCH_EMAILS (direct) failed: {e:#}\"))?\n        }\n    };\n\n    if !resp.successful {\n        let err = resp.error.unwrap_or_else(|| \"unknown error\".into());","sourceCodeStart":518,"sourceCodeEnd":554,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/openhuman/agent/learning/linkedin_enrichment.rs#L518-L554","documentation":"Error \"GMAIL_FETCH_EMAILS failed: {e:#}\" thrown in tinyhumansai/openhuman.","triggerScenarios":"Thrown at src/openhuman/agent/learning/linkedin_enrichment.rs:536 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}