Skip to content

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

fix(web_chat): simplify error event construction

Steven Enamakel7f7413455d86
diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/native_runner.rs b/crates/openhuman-core/src/channels/runtime/dispatch/native_runner.rs
index e51a5a0cd0..52de1bac9f 100644
--- a/crates/openhuman-core/src/channels/runtime/dispatch/native_runner.rs
+++ b/crates/openhuman-core/src/channels/runtime/dispatch/native_runner.rs
@@ -428,7 +428,7 @@ impl EventSink<QueuedPayload> for NativeEvents {
None
};
let localized =
- render_classified_native_failure(config.as_ref(), &fallback, &classification);
+ render_classified_native_failure(None, &fallback, &classification);
#[cfg(test)]
self.shared.with(&request.request_id, |slot| {
slot.failure_message = Some(localized.clone());
diff --git a/crates/openhuman-core/src/web_chat/turn_events.rs b/crates/openhuman-core/src/web_chat/turn_events.rs
index 450e9b9fa8..17c3d1bda5 100644
--- a/crates/openhuman-core/src/web_chat/turn_events.rs
+++ b/crates/openhuman-core/src/web_chat/turn_events.rs
@@ -420,12 +420,7 @@ fn chat_error_event(
.map(|failure| failure.message.clone())
.unwrap_or(classified.message),
),
- error_type: Some(
- structured
- .map(|failure| failure.class.as_str())
- .unwrap_or(classified.error_type)
- .to_owned(),
- ),
+ error_type: Some(classified.error_type.to_owned()),
error_source: Some(classified.source.to_owned()),
error_retryable: Some(classified.retryable),
error_retry_after_ms: classified.retry_after_ms,