Skip to content

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

fix(core_rpc): handle missing optional fields in RPC response deserialization

Steven Enamakel7a5bf62ac62e
diff --git a/app/src-tauri/src/core_rpc.rs b/app/src-tauri/src/core_rpc.rs
index 813bb746ac..5fdb6736ca 100644
--- a/app/src-tauri/src/core_rpc.rs
+++ b/app/src-tauri/src/core_rpc.rs
@@ -200,13 +200,16 @@ mod tests {
#[cfg(feature = "gateways")]
#[tokio::test]
async fn insecure_transport_refusal_redacts_url() {
- let err = super::post_json_rpc(
+ let err = match super::post_json_rpc(
"http://user:[email protected]:7788/rpc/secret?token=t0k",
Some("bearer-tok"),
"body".to_string(),
)
.await
- .expect_err("insecure non-loopback + bearer must be refused");
+ {
+ Err(e) => e,
+ Ok(_) => panic!("insecure non-loopback + bearer must be refused"),
+ };
assert!(
!err.contains("pass"),
"raw userinfo leaked into refusal error: {err}"