{"record":{"id":"2c623438734d494d","repo":"tinyhumansai/openhuman","slug":"integration-id-is-required","errorCode":null,"errorMessage":"integration id is required","messagePattern":"integration id is required","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/api/rest.rs","lineNumber":1121,"sourceCode":"    ) -> Result<Value> {\n        let channel = channel.trim().trim_matches('/');\n        anyhow::ensure!(!channel.is_empty(), \"channel is required\");\n        let encoded = urlencoding::encode(channel);\n        let mut path = format!(\"channels/{encoded}/threads\");\n        if let Some(active) = active_filter {\n            path.push_str(if active {\n                \"?active=true\"\n            } else {\n                \"?active=false\"\n            });\n        }\n        self.authed_json(bearer_jwt, Method::GET, &path, None).await\n    }\n\n    /// Revokes (deletes) an active integration.\n    pub async fn revoke_integration(&self, integration_id: &str, bearer_jwt: &str) -> Result<()> {\n        let id = integration_id.trim();\n        anyhow::ensure!(!id.is_empty(), \"integration id is required\");\n        self.authed_json(\n            bearer_jwt,\n            Method::DELETE,\n            &format!(\"auth/integrations/{id}\"),\n            None,\n        )\n        .await?;\n        Ok(())\n    }\n}\n\n/// AES-256-GCM decrypt compatible with backend `encryptMessageFromString` (IV 16 + tag 16 + ciphertext, base64).\npub fn decrypt_handoff_blob(b64_ciphertext: &str, key_str: &str) -> Result<String> {\n    let key = key_bytes_from_string(key_str)?;\n    let combined = base64::engine::general_purpose::STANDARD\n        .decode(b64_ciphertext.trim())\n        .context(\"base64-decode encrypted payload\")?;\n    if combined.len() < 32 {","sourceCodeStart":1103,"sourceCodeEnd":1139,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/api/rest.rs#L1103-L1139","documentation":"anyhow::ensure! argument guard in revoke_integration: after trimming, the integration id parameter is empty. The method issues the DELETE that revokes an active integration; an empty id would produce a malformed revoke route, so it is rejected locally before the authenticated backend call.","triggerScenarios":"Thrown at src/api/rest.rs:1121 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the integration id from the integrations listing response","Verify the caller did not drop/blank the id before the revoke call"],"exampleFix":null,"handlingStrategy":"validation","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-23T08:17:48.524Z"}