tinyhumansai/openhuman · error · anyhow::Error
Composio v2 action execution failed: {err}
Error message
Composio v2 action execution failed: {err} What it means
Non-2xx from the legacy v2 POST /actions/execute fallback (execute_action_v2). Reached only after the v3 execution already failed, so in isolation it indicates a direct v2 call. response_error folds status + body into {err}.
Source
Thrown at src/openhuman/integrations/composio/tools/direct.rs:498
let mut body = json!({
"input": params,
});
if let Some(entity) = entity_id {
body["entityId"] = json!(entity);
}
let resp = self
.client()
.post(&url)
.header("x-api-key", &self.api_key)
.json(&body)
.send()
.await?;
if !resp.status().is_success() {
let err = response_error(resp).await;
anyhow::bail!("Composio v2 action execution failed: {err}");
}
let result: serde_json::Value = resp
.json()
.await
.context("Failed to decode Composio v2 execute response")?;
Ok(result)
}
/// Get the OAuth connection URL for a specific app/toolkit or auth config.
///
/// Uses v3 endpoint first and falls back to v2 for compatibility.
pub async fn get_connection_url(
&self,
app_name: Option<&str>,
auth_config_id: Option<&str>,
entity_id: &str,
) -> anyhow::Result<String> {View on GitHub (pinned to 7491200858)
Solutions
- Compare with the v3 error that preceded it — if v3 said 'unknown action' and v2 says the same, the action slug is wrong for both APIs
- Prefer diagnosing and fixing the v3 path; v2 is a compatibility fallback, not a second chance with different semantics
- 401: fix the API key; 429/5xx: back off and retry when the action is safe to re-run
Defensive patterns
Strategy: try-catch
Try / catch
match tool.execute_action(name, params, entity).await {
Ok(v) => Ok(v),
Err(e) => {
// v2 is the fallback layer; its error usually restates the v3 root cause.
log_both_versions(format!("{e:#}"));
Err(e)
}
} Prevention
- Do not shape params for v2 unless you intentionally target the legacy API — param layouts differ
- If an action exists only in v3, expect v2 to 404 and treat that path as terminal
- Keep executions out of automatic retry loops entirely
When it happens
Trigger: Same root causes as v3 execution failure but re-expressed by the v2 API: invalid appName/actionName pair, param shape mismatch (v2 wraps params differently), 401, 429, 5xx.
Common situations: An action that only exists in v3 (v2 answers 404/400 unknown action); params shaped for v3 passed to the v2 body layout; both versions failing on auth.
Related errors
- Composio v2 API error: {err}
- Composio v3 action execution failed: {err}
- Composio v2 connect failed: {err}
- Composio execute failed on v3 ({v3_err}) and v2 fallback ({v
- composio.execute_tool: tool slug must not be empty
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/48a67c1b11cf578d.
Report an issue: GitHub.