Skip to content

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

refactor(memory): adjust error mapping in app_host

Steven Enamakel72caf3e6c794
diff --git a/crates/openhuman-core/src/memory/layout_migration/app_host.rs b/crates/openhuman-core/src/memory/layout_migration/app_host.rs
index 974fd21323..0de2bf16d6 100644
--- a/crates/openhuman-core/src/memory/layout_migration/app_host.rs
+++ b/crates/openhuman-core/src/memory/layout_migration/app_host.rs
@@ -44,11 +44,10 @@ pub(super) fn to_module(error: MemoryError) -> lm::Error {
MemoryError::Unsupported(message) => EngineError::Unsupported(message).into(),
MemoryError::Unauthorized(message) => EngineError::Unauthorized(message).into(),
MemoryError::Unavailable(message) => EngineError::Unavailable(message).into(),
- // The backend's `[CODE] ` prefix stays on the message, which is how
- // the module tells an exhausted balance.
- MemoryError::InsufficientCredits(message) | MemoryError::Engine(message) => {
- EngineError::Engine(message).into()
+ MemoryError::InsufficientCredits(message) => {
+ EngineError::InsufficientCredits(message).into()
}
+ MemoryError::Engine(message) => EngineError::Engine(message).into(),
MemoryError::ConfigConflict(error) => EngineError::Engine(error.message).into(),
}
}