{"record":{"id":"48a67c1b11cf578d","repo":"tinyhumansai/openhuman","slug":"composio-v2-action-execution-failed-err","errorCode":null,"errorMessage":"Composio v2 action execution failed: {err}","messagePattern":"Composio v2 action execution failed: (.+?)","errorType":"http","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/integrations/composio/tools/direct.rs","lineNumber":498,"sourceCode":"        let mut body = json!({\n            \"input\": params,\n        });\n\n        if let Some(entity) = entity_id {\n            body[\"entityId\"] = json!(entity);\n        }\n\n        let resp = self\n            .client()\n            .post(&url)\n            .header(\"x-api-key\", &self.api_key)\n            .json(&body)\n            .send()\n            .await?;\n\n        if !resp.status().is_success() {\n            let err = response_error(resp).await;\n            anyhow::bail!(\"Composio v2 action execution failed: {err}\");\n        }\n\n        let result: serde_json::Value = resp\n            .json()\n            .await\n            .context(\"Failed to decode Composio v2 execute response\")?;\n        Ok(result)\n    }\n\n    /// Get the OAuth connection URL for a specific app/toolkit or auth config.\n    ///\n    /// Uses v3 endpoint first and falls back to v2 for compatibility.\n    pub async fn get_connection_url(\n        &self,\n        app_name: Option<&str>,\n        auth_config_id: Option<&str>,\n        entity_id: &str,\n    ) -> anyhow::Result<String> {","sourceCodeStart":480,"sourceCodeEnd":516,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/integrations/composio/tools/direct.rs#L480-L516","documentation":"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}.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match tool.execute_action(name, params, entity).await {\n    Ok(v) => Ok(v),\n    Err(e) => {\n        // v2 is the fallback layer; its error usually restates the v3 root cause.\n        log_both_versions(format!(\"{e:#}\"));\n        Err(e)\n    }\n}","preventionTips":["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"],"tags":["composio","execute","http-error","v2","action","legacy-fallback"],"backgroundTag":"upstream-api-error-status","analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}