tinyhumansai/openhuman · error · anyhow::Error

Apify run failed

Error message

Apify run failed: {e:#}

What it means

The backend route /agent-integrations/apify/run (used to invoke the LinkedIn scraper actor) returned an error — backend auth expired, the route rejected the request, or the Apify call failed server-side. The scrape stage of profile enrichment cannot produce data.

Solutions

  1. Verify the backend session is valid and retry the enrichment run
  2. Check the Apify integration is enabled for the account and the actor name/limits are correct
  3. Skip the scrape stage and continue with a profile built from other stages
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/openhuman/agent/learning/linkedin_enrichment.rs:651 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/f534e45ed79096df. Report an issue: GitHub.

Appendix: source

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

        "input": {
            "profileUrls": [profile_url],
        },
        "sync": true,
        "timeoutSecs": 120,
    });

    tracing::debug!(
        actor = LINKEDIN_SCRAPER_ACTOR,
        url_len = profile_url.len(),
        "[linkedin_enrichment] invoking Apify actor"
    );

    // The backend wraps the Apify response in its standard envelope.
    // `IntegrationClient::post` already unwraps `{ success, data }`.
    let resp: serde_json::Value = client
        .post("/agent-integrations/apify/run", &body)
        .await
        .map_err(|e| anyhow::anyhow!("Apify run failed: {e:#}"))?;

    let status = resp
        .get("status")
        .and_then(|v| v.as_str())
        .unwrap_or("UNKNOWN");

    if status != "SUCCEEDED" {
        anyhow::bail!("Apify run finished with status: {status}");
    }

    // Extract the first item from the inline results array.
    let items = resp
        .get("items")
        .and_then(|v| v.as_array())
        .ok_or_else(|| anyhow::anyhow!("Apify run returned no items array"))?;

    items
        .first()

View on GitHub (pinned to 7491200858)