From d2545cf48c0b1ef2d83c80f597c01771b5d764c1 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Wed, 10 Sep 2025 10:07:59 +0200 Subject: [PATCH] chore: continue on response serialization error --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index b342024..4c83ba7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -165,8 +165,10 @@ async fn main() -> Result<(), Box> { status_body: serde_json::from_str::(&response.status_body) .unwrap_or(json!({})), }; - let response_payload = serde_json::to_string(&response_payload)?; - + let Ok(response_payload) = serde_json::to_string(&response_payload) else { + error!("Error serializing response"); + continue; + }; let response_record = FutureRecord::to(&CONFIG.response_topic) .key(key) .payload(&response_payload);