mirror of
https://github.com/pcvolkmer/mv64e-kafka-to-rest-gateway
synced 2025-09-13 09:12:52 +00:00
chore: continue on response serialization error
This commit is contained in:
@@ -165,8 +165,10 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
|||||||
status_body: serde_json::from_str::<Value>(&response.status_body)
|
status_body: serde_json::from_str::<Value>(&response.status_body)
|
||||||
.unwrap_or(json!({})),
|
.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)
|
let response_record = FutureRecord::to(&CONFIG.response_topic)
|
||||||
.key(key)
|
.key(key)
|
||||||
.payload(&response_payload);
|
.payload(&response_payload);
|
||||||
|
Reference in New Issue
Block a user