Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

feat(integrations): add support for HTTP error handling in integrations

Steven Enamakel53b5847d6519
diff --git a/crates/openhuman-core/src/integrations/composio/tools/direct/construction.rs b/crates/openhuman-core/src/integrations/composio/tools/direct/construction.rs
index cb9f911b67..9da4c9abd7 100644
--- a/crates/openhuman-core/src/integrations/composio/tools/direct/construction.rs
+++ b/crates/openhuman-core/src/integrations/composio/tools/direct/construction.rs
@@ -11,7 +11,7 @@ use std::sync::Arc;
#[cfg(debug_assertions)]
use super::types::is_loopback_http_base;
-fn normalize_entity_id(entity_id: &str) -> String {
+pub(super) fn normalize_entity_id(entity_id: &str) -> String {
let trimmed = entity_id.trim();
if trimmed.is_empty() {
"default".to_string()
diff --git a/crates/openhuman-core/src/integrations/composio/tools/direct/http_errors.rs b/crates/openhuman-core/src/integrations/composio/tools/direct/http_errors.rs
index 2367d8e5c1..c0e430da6c 100644
--- a/crates/openhuman-core/src/integrations/composio/tools/direct/http_errors.rs
+++ b/crates/openhuman-core/src/integrations/composio/tools/direct/http_errors.rs
@@ -36,7 +36,7 @@ fn sanitize_error_message(message: &str) -> String {
crate::util::truncate_with_ellipsis(&sanitized, 240)
}
-fn extract_api_error_message(body: &str) -> Option<String> {
+pub(super) fn extract_api_error_message(body: &str) -> Option<String> {
let parsed: serde_json::Value = serde_json::from_str(body).ok()?;
parsed
.get("error")