Skip to content

Commit

Permalink
Retry failed S3 uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Dec 28, 2024
1 parent f195a9d commit 736b113
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions apps/labrinth/src/file_hosting/s3_host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ impl FileHost for S3Host {
content_type,
)
.await
.map_err(|_| {
FileHostingError::S3Error(
"Error while uploading file to S3".to_string(),
)
.map_err(|err| {
FileHostingError::S3Error(format!(
"Error while uploading file {file_name} to S3: {err}"
))
})?;

Ok(UploadFileData {
Expand All @@ -100,10 +100,10 @@ impl FileHost for S3Host {
self.bucket
.delete_object(format!("/{file_name}"))
.await
.map_err(|_| {
FileHostingError::S3Error(
"Error while deleting file from S3".to_string(),
)
.map_err(|err| {
FileHostingError::S3Error(format!(
"Error while deleting file {file_name} to S3: {err}"
))
})?;

Ok(DeleteFileData {
Expand Down

0 comments on commit 736b113

Please sign in to comment.