Skip to content

Commit

Permalink
mantle/platform: fix error handling in ibmcloud/s3 CopyObject
Browse files Browse the repository at this point in the history
I suspect this was a copy/paste error. `BucketAlreadyOwnedByYou` is
an error reported from createBucket(), which we aren't calling here.
  • Loading branch information
dustymabe committed Nov 14, 2022
1 parent 84bfb24 commit e80eb3a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mantle/platform/api/ibmcloud/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,9 @@ func (a *API) CopyObject(srcBucket, srcName, destBucket string) error {
})
if err != nil {
if awserr, ok := err.(awserr.Error); ok {
if awserr.Code() == "BucketAlreadyOwnedByYou" {
return nil
}
err = awserr
}
return fmt.Errorf("Error copying object to bucket: %v", err)
}

// Wait to see if the item got copied
Expand Down

0 comments on commit e80eb3a

Please sign in to comment.