Always update response if error

https://feedback.yaak.app/p/cant-re-send-request-if-there-is-one-ongoing
This commit is contained in:
Gregory Schier
2025-07-10 12:51:04 -07:00
parent f745435d26
commit 840f15c997
2 changed files with 52 additions and 18 deletions

View File

@@ -167,9 +167,9 @@ pub async fn send_http_request<R: Runtime>(
let cookies = cj
.cookies
.iter()
.map(|cookie| {
let json_cookie = serde_json::to_value(cookie).unwrap();
serde_json::from_value(json_cookie).expect("Failed to deserialize cookie")
.filter_map(|cookie| {
let json_cookie = serde_json::to_value(cookie).ok()?;
serde_json::from_value(json_cookie).ok()?
})
.map(|c| Ok(c))
.collect::<Vec<Result<_>>>();