Skip to content

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

feat(config): add config_save_error_with_full_context

Steven Enamakel2ee41a89c3e7
diff --git a/crates/openhuman-core/src/config/ops/mod.rs b/crates/openhuman-core/src/config/ops/mod.rs
index ee0d7f5941..d99b04e142 100644
--- a/crates/openhuman-core/src/config/ops/mod.rs
+++ b/crates/openhuman-core/src/config/ops/mod.rs
@@ -25,6 +25,17 @@ pub(crate) fn config_save_error_with_context(
error: anyhow::Error,
context: &str,
retryable: bool,
+) -> String {
+ if let Some(conflict) = config_save_conflict(&error, retryable) {
+ return conflict.encode();
+ }
+ format!("{context}: {error}")
+}
+
+pub(crate) fn config_save_error_with_full_context(
+ error: anyhow::Error,
+ context: &str,
+ retryable: bool,
) -> String {
if let Some(conflict) = config_save_conflict(&error, retryable) {
return conflict.encode();