Skip to content

Commit b93ae87

Browse files
committed
feat: improve error handling for _upload_multipart
1 parent 05e8167 commit b93ae87

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/storage/gcs.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,13 @@ impl Gcs {
378378
async_writer.put_part(part_data.into()).await?;
379379
}
380380
if let Err(err) = async_writer.complete().await {
381-
error!("Failed to complete multipart upload. {:?}", err);
382-
async_writer.abort().await?;
381+
if let Err(abort_err) = async_writer.abort().await {
382+
error!(
383+
"Failed to abort multipart upload after completion failure: {:?}",
384+
abort_err
385+
);
386+
}
387+
return Err(err.into());
383388
};
384389
}
385390
Ok(())

0 commit comments

Comments
 (0)