1
0
mirror of https://github.com/pcvolkmer/mv64e-kafka-to-rest-gateway synced 2025-09-13 01:02:51 +00:00

chore: continue on response serialization error

This commit is contained in:
2025-09-10 10:07:59 +02:00
parent 370da27788
commit d2545cf48c

View File

@@ -165,8 +165,10 @@ async fn main() -> Result<(), Box<dyn Error>> {
status_body: serde_json::from_str::<Value>(&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);