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);