{"record":{"id":"564bc921ddb7c21d","repo":"tinyhumansai/openhuman","slug":"composio-enable-trigger-connectionid-must-not-be","errorCode":null,"errorMessage":"composio.enable_trigger: connectionId must not be empty","messagePattern":"composio\\.enable_trigger: connectionId must not be empty","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/integrations/composio/client.rs","lineNumber":437,"sourceCode":"        };\n        tracing::debug!(path = %path, \"[composio] list_active_triggers\");\n        self.inner\n            .get::<ComposioActiveTriggersResponse>(&path)\n            .await\n    }\n\n    /// `POST /agent-integrations/composio/triggers` — enable a single\n    /// trigger on a connection the caller owns.\n    pub async fn enable_trigger(\n        &self,\n        connection_id: &str,\n        slug: &str,\n        trigger_config: Option<serde_json::Value>,\n    ) -> Result<ComposioEnableTriggerResponse> {\n        let connection_id = connection_id.trim();\n        let slug = slug.trim();\n        if connection_id.is_empty() {\n            anyhow::bail!(\"composio.enable_trigger: connectionId must not be empty\");\n        }\n        if slug.is_empty() {\n            anyhow::bail!(\"composio.enable_trigger: slug must not be empty\");\n        }\n        let mut body = json!({ \"connectionId\": connection_id, \"slug\": slug });\n        if let Some(config) = trigger_config {\n            body[\"triggerConfig\"] = config;\n        }\n        tracing::debug!(slug = %slug, connection_id = %connection_id, \"[composio] enable_trigger\");\n        self.inner\n            .post::<ComposioEnableTriggerResponse>(\"/agent-integrations/composio/triggers\", &body)\n            .await\n    }\n\n    /// `DELETE /agent-integrations/composio/triggers/:triggerId`.\n    pub async fn disable_trigger(\n        &self,\n        trigger_id: &str,","sourceCodeStart":419,"sourceCodeEnd":455,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/integrations/composio/client.rs#L419-L455","documentation":"ComposioClient::enable_trigger requires both a connectionId and a slug; this variant bails when the trimmed connectionId is empty, before POST /agent-integrations/composio/triggers is built. The connection must be one the caller owns — the id comes from list_connections or the available-triggers catalog.","triggerScenarios":"Calling enable_trigger(\"\", slug, config) or with a whitespace-only connection id — usually the enable action fired before a connection was chosen, or from a row whose connection reference was cleared.","commonSituations":"Trigger-enable UI with no connection selected; connection deleted concurrently while the enable dialog was open; connection id mapping dropped in a row-to-handler transform.","solutions":["Make connection selection a hard prerequisite in the UI flow before enable is reachable","Refresh connections and re-derive the id when the stored one is blank","Validate both connectionId and slug together at the RPC boundary for a single clear error"],"exampleFix":"// before\nclient.enable_trigger(&selected.connection_id, &slug, cfg).await?;\n\n// after\nlet Some(conn) = selected.connection_id.as_deref().map(str::trim).filter(|s| !s.is_empty()) else {\n    anyhow::bail!(\"select a connection before enabling the trigger\");\n};\nclient.enable_trigger(conn, &slug, cfg).await?;","handlingStrategy":"validation","validationCode":"let connection_id = connection_id.trim();\nif connection_id.is_empty() {\n    anyhow::bail!(\"a connection is required to enable a trigger\");\n}\nclient.enable_trigger(connection_id, slug, trigger_config).await?;","typeGuard":"fn is_non_empty_id(s: &str) -> bool {\n    !s.trim().is_empty()\n}","tryCatchPattern":null,"preventionTips":["Make connection selection a hard prerequisite before the enable action is exposed","Re-derive connection ids from a fresh list when the stored one is blank","Validate connectionId and slug together in one boundary check for a single clear error"],"tags":["composio","triggers","validation","empty-string","argument-validation"],"backgroundTag":"empty-string-argument","analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","schemaVersion":2},"datasetVersion":"2026-08-23T13:39:53.451Z"}