Fix code issues
This commit is contained in:
parent
75002d9bf3
commit
c0677c3ed1
@ -22,11 +22,11 @@ pub async fn create_bucket_if_required() -> anyhow::Result<()> {
|
||||
log::debug!("The bucket already exists.");
|
||||
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.");
|
||||
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!")
|
||||
}
|
||||
Err(e) => {
|
||||
|
Loading…
Reference in New Issue
Block a user