tinyhumansai/openhuman · error
learning_enrich_profile: {e:#}
Error message
learning_enrich_profile: {e:#} What it means
Thrown by learning_enrich_profile when run_linkedin_enrichment() fails — a multi-stage external pipeline: it needs a signed-in integration client ('no integration client — user not signed in'), goes through Composio/Apify (LinkedIn scrape, 'Apify run failed' / empty items) and Gmail evidence fetch, then writes PROFILE.md and persists the profile into the memory store. Any stage failure bubbles up here with the full {e:#} chain naming the broken stage.
Source
Thrown at src/openhuman/agent/learning/tools.rs:603
fn external_effect(&self) -> bool {
true
}
async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
log::debug!("[tool][learning] enrich_profile invoked");
let preset = args
.get("profile_url")
.and_then(serde_json::Value::as_str)
.map(str::to_string);
let config = config_rpc::load_config_with_timeout()
.await
.map_err(|e| anyhow::anyhow!("learning_enrich_profile: {e}"))?;
let result =
crate::openhuman::agent::learning::linkedin_enrichment::run_linkedin_enrichment(
&config, preset,
)
.await
.map_err(|e| anyhow::anyhow!("learning_enrich_profile: {e:#}"))?;
Ok(ToolResult::success(serde_json::to_string(&json!({
"profile_url": result.profile_url,
"profile_data": result.profile_data,
"stages": result.stages,
"log": result.log,
}))?))
}
}
#[cfg(test)]
mod tests {
use super::*;
use crate::openhuman::tools::traits::ToolScope;
#[test]
fn names_and_levels() {
assert_eq!(LearningListFacetsTool.name(), "learning_list_facets");
assert_eq!(View on GitHub (pinned to a221052e0d)
Solutions
- Read the {e:#} chain first — it names the exact stage ('no integration client', 'Apify run failed', 'GMAIL_FETCH_EMAILS failed', store/write errors)
- Sign in / reconnect the LinkedIn integration in Connections, then retry
- Verify Composio/Apify credentials and network reachability
- For a profile that yields empty items, pass an explicit profile_url and retry, or fall back to learning_save_profile with pasted markdown
Example fix
// before
tool: learning_enrich_profile {} // -> learning_enrich_profile: no integration client — user not signed in
// after: connect LinkedIn in Connections UI, then
tool: learning_enrich_profile {"profile_url":"https://www.linkedin.com/in/<handle>"} Defensive patterns
Strategy: validation
Validate before calling
// Preconditions from the pipeline's own failure modes: // 1) integration client must exist (user signed in) — check Connections status for LinkedIn // 2) Composio/Apify credentials configured // 3) workspace writable (learning_save_profile with empty-ish markdown succeeds) // Only then invoke learning_enrich_profile.
Try / catch
match tool_exec("learning_enrich_profile", args).await {
Err(e) => {
let msg = e.to_string();
if msg.contains("no integration client") || msg.contains("not signed in") {
return Err(e); // auth — retrying won't help until the user connects
}
if msg.contains("Apify") || msg.contains("GMAIL") || msg.contains("timeout") {
tokio::time::sleep(Duration::from_secs(5)).await;
return tool_exec("learning_enrich_profile", args).await; // transient upstream
}
Err(e)
}
ok => ok,
} Prevention
- Connect the LinkedIn integration (sign in) before the first enrichment run
- Pass an explicit profile_url rather than relying on discovery
- On repeated Apify 'empty items', fall back to pasting the profile via learning_save_profile
- The error chain names the failing stage — always read it before retrying blindly
When it happens
Trigger: User not signed in / LinkedIn integration not connected; missing or invalid Composio/Apify credentials; Apify run failing or returning zero items for a private/hidden profile; network outage mid-scrape; memory client unavailable at persist time; PROFILE.md write failure.
Common situations: First enrichment attempt before connecting the LinkedIn integration; expired third-party tokens; scraping profiles that require login walls; flaky upstream Apify jobs.
Related errors
- learning_save_profile: summarisation failed: {e:#}
- integrationId must be a 24-char hex id
- integration id is required
- tick failed: {e}
- learning_update_facet: {e:#}
AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16).
Data as JSON: /api/errors/ed5a590578c72f15.
Report an issue: GitHub.