Skip to content

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

fix(web_chat): preserve backslash for unknown JSON escape sequences

yuj84a5c91535b4
diff --git a/src/openhuman/web_chat/web_errors_part_01.rs b/src/openhuman/web_chat/web_errors_part_01.rs
index d52e190111..bf8eab0053 100644
--- a/src/openhuman/web_chat/web_errors_part_01.rs
+++ b/src/openhuman/web_chat/web_errors_part_01.rs
@@ -157,7 +157,10 @@ pub(crate) fn extract_provider_error_detail(err: &str) -> Option<String> {
'\\' => out.push('\\'),
'n' => out.push('\n'),
't' => out.push('\t'),
- other => out.push(other),
+ other => {
+ out.push('\\');
+ out.push(other);
+ }
}
}
}