From 89853e24e5c346ed0c85f8afe93caab7fa3ec7cf Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Thu, 9 Mar 2023 22:53:01 -0800 Subject: [PATCH] all strings for json --- web3_proxy/src/frontend/status.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/web3_proxy/src/frontend/status.rs b/web3_proxy/src/frontend/status.rs index a6997c14..0bb6c90e 100644 --- a/web3_proxy/src/frontend/status.rs +++ b/web3_proxy/src/frontend/status.rs @@ -31,9 +31,14 @@ pub async fn health( #[debug_handler] pub async fn status_headers(headers: HeaderMap) -> impl IntoResponse { - let headers: HashMap, String> = headers + let headers: HashMap = headers .into_iter() - .map(|(k, v)| (k.map(|k| k.to_string()), format!("{:?}", v))) + .map(|(k, v)| { + ( + k.map(|k| k.to_string()).unwrap_or_default(), + format!("{:?}", v), + ) + }) .collect(); let body = json!({ "headers": headers });