diff --git a/apps/labrinth/src/file_hosting/s3_host.rs b/apps/labrinth/src/file_hosting/s3_host.rs index 87be229ab..c48937811 100644 --- a/apps/labrinth/src/file_hosting/s3_host.rs +++ b/apps/labrinth/src/file_hosting/s3_host.rs @@ -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 { @@ -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 {