tinyhumansai/openhuman · error · anyhow::Error

integration id is required

Error message

integration id is required

What it means

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.

Solutions

  1. Pass the integration id from the integrations listing response
  2. Verify the caller did not drop/blank the id before the revoke call
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/api/rest.rs:1121 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/2c623438734d494d. Report an issue: GitHub.

Appendix: source

Thrown at src/api/rest.rs:1121

    ) -> Result<Value> {
        let channel = channel.trim().trim_matches('/');
        anyhow::ensure!(!channel.is_empty(), "channel is required");
        let encoded = urlencoding::encode(channel);
        let mut path = format!("channels/{encoded}/threads");
        if let Some(active) = active_filter {
            path.push_str(if active {
                "?active=true"
            } else {
                "?active=false"
            });
        }
        self.authed_json(bearer_jwt, Method::GET, &path, None).await
    }

    /// Revokes (deletes) an active integration.
    pub async fn revoke_integration(&self, integration_id: &str, bearer_jwt: &str) -> Result<()> {
        let id = integration_id.trim();
        anyhow::ensure!(!id.is_empty(), "integration id is required");
        self.authed_json(
            bearer_jwt,
            Method::DELETE,
            &format!("auth/integrations/{id}"),
            None,
        )
        .await?;
        Ok(())
    }
}

/// AES-256-GCM decrypt compatible with backend `encryptMessageFromString` (IV 16 + tag 16 + ciphertext, base64).
pub fn decrypt_handoff_blob(b64_ciphertext: &str, key_str: &str) -> Result<String> {
    let key = key_bytes_from_string(key_str)?;
    let combined = base64::engine::general_purpose::STANDARD
        .decode(b64_ciphertext.trim())
        .context("base64-decode encrypted payload")?;
    if combined.len() < 32 {

View on GitHub (pinned to 7491200858)