Skip to content

Commit 2e26006

Browse files
zrmarleygoose
andcommitted
fix(host): warn on consumed upload dispatch failures
Co-authored-by: goose <[email protected]> Signed-off-by: Zach Marley <[email protected]>
1 parent 595a679 commit 2e26006

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎src-tauri/src/host_request.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,9 @@ pub(crate) async fn plugin_host_upload_bytes_once<R: tauri::Runtime>(
379379
&once,
380380
upload.fingerprint(bytes)?,
381381
)?;
382-
send_byte_upload(url, &upload, bytes).await
382+
send_byte_upload(url, &upload, bytes)
383+
.await
384+
.map_err(|error| format!("{error}; outcome unknown"))
383385
};
384386
tokio::time::timeout_at(deadline, operation)
385387
.await

‎src-tauri/src/host_request/replay_tests.rs‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -605,9 +605,8 @@ fn upload_raw_ipc_consumes_once_without_files_and_binds_bytes_and_metadata() {
605605
listener
606606
});
607607
let raw = || tauri::ipc::InvokeBody::Raw(PNG_UPLOAD.to_vec());
608-
assert!(upload_ipc(&fixture, &metadata, raw())
609-
.unwrap_err()
610-
.contains("Host request failed"));
608+
let dispatch_error = upload_ipc(&fixture, &metadata, raw()).unwrap_err();
609+
assert!(dispatch_error.contains("Host request failed; outcome unknown"));
611610
let listener = server.join().unwrap();
612611
assert!(upload_ipc(&fixture, &metadata, raw())
613612
.unwrap_err()

0 commit comments

Comments
 (0)