{"record":{"id":"f286821dfec4463e","repo":"tinyhumansai/openhuman","slug":"no-redirect-url-in-composio-v3-response","errorCode":null,"errorMessage":"No redirect URL in Composio v3 response","messagePattern":"No redirect URL in Composio v3 response","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/integrations/composio/tools/direct.rs","lineNumber":578,"sourceCode":"        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 v3 connect failed: {err}\");\n        }\n\n        let result: serde_json::Value = resp\n            .json()\n            .await\n            .context(\"Failed to decode Composio v3 connect response\")?;\n        extract_redirect_url(&result)\n            .ok_or_else(|| anyhow::anyhow!(\"No redirect URL in Composio v3 response\"))\n    }\n\n    async fn get_connection_url_v2(\n        &self,\n        app_name: &str,\n        entity_id: &str,\n    ) -> anyhow::Result<String> {\n        let url = format!(\"{}/connectedAccounts\", self.base_v2);\n\n        let body = json!({\n            \"integrationId\": app_name,\n            \"entityId\": entity_id,\n        });\n\n        let resp = self\n            .client()\n            .post(&url)\n            .header(\"x-api-key\", &self.api_key)","sourceCodeStart":560,"sourceCodeEnd":596,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/integrations/composio/tools/direct.rs#L560-L596","documentation":"The Composio v3 connect call succeeded (2xx, JSON decoded) but the response contains no redirect URL where extract_redirect_url can find it — a malformed/unexpected response shape from the v3 endpoint.","triggerScenarios":"Thrown at src/openhuman/integrations/composio/tools/direct.rs:578 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry — v3 occasionally returns a success envelope without the OAuth redirect","Fall back to the v2 flow by supplying an app_name","Inspect the raw response body to see where Composio moved the redirect field"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}