Skip to content

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

fix(task_sources): convert provider slug parse error to anyhow

Steven Enamakelca03629996a5
diff --git a/crates/openhuman-core/src/integrations/task_sources/store_documents.rs b/crates/openhuman-core/src/integrations/task_sources/store_documents.rs
index 63eb71ce15..c6a34d5f1c 100644
--- a/crates/openhuman-core/src/integrations/task_sources/store_documents.rs
+++ b/crates/openhuman-core/src/integrations/task_sources/store_documents.rs
@@ -108,7 +108,7 @@ fn to_source(stored: &Versioned<Value>) -> Result<TaskSource> {
};
Ok(TaskSource {
id: stored.id.clone(),
- provider: ProviderSlug::parse(field("provider")?)?,
+ provider: ProviderSlug::parse(field("provider")?).map_err(|error| anyhow!(error))?,
connection_id: text(doc, "connection_id").map(str::to_string),
name: text(doc, "name").map(str::to_string),
enabled: doc.get("enabled").and_then(Value::as_bool).unwrap_or(true),