Skip to content

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

test(session_host): assert on full error chain in host tool test

Steven Enamakel21d36c488013
diff --git a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_tools_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_tools_tests.rs
index 19ba4d5883..abc9e681ce 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_tools_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_tools_tests.rs
@@ -254,9 +254,10 @@ fn invalid_dynamic_prompt_fails_before_the_host_tool_factory_runs() {
.err()
.expect("a dynamic prompt without a builder must be rejected");
- assert!(error
- .to_string()
- .contains("dynamic prompt but has no builder"));
+ assert!(
+ format!("{error:#}").contains("dynamic prompt but has no builder"),
+ "unexpected error: {error:#}"
+ );
assert_eq!(
calls.load(Ordering::SeqCst),
0,