Fix code issues
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Pierre HUBERT 2024-06-15 08:03:36 +00:00
parent 75002d9bf3
commit c0677c3ed1

View File

@ -22,11 +22,11 @@ pub async fn create_bucket_if_required() -> anyhow::Result<()> {
log::debug!("The bucket already exists."); log::debug!("The bucket already exists.");
return Ok(()); return Ok(());
} }
Err(S3Error::Http(404, s)) if s.contains("<Code>NoSuchKey</Code>") => { Err(S3Error::HttpFailWithBody(404, s)) if s.contains("<Code>NoSuchKey</Code>") => {
log::warn!("Failed to fetch bucket location, but it seems that bucket exists."); log::warn!("Failed to fetch bucket location, but it seems that bucket exists.");
return Ok(()); return Ok(());
} }
Err(S3Error::Http(404, s)) if s.contains("<Code>NoSuchBucket</Code>") => { Err(S3Error::HttpFailWithBody(404, s)) if s.contains("<Code>NoSuchBucket</Code>") => {
log::warn!("The bucket does not seem to exists, trying to create it!") log::warn!("The bucket does not seem to exists, trying to create it!")
} }
Err(e) => { Err(e) => {