mirror of
https://github.com/minio/minio.git
synced 2025-11-29 05:19:03 -05:00
handle dns.ErrBucketConflict as BucketAlreadyExists (#12013)
This commit is contained in:
@@ -100,6 +100,10 @@ func (c *OperatorDNS) Put(bucket string) error {
|
||||
xhttp.DrainBody(resp.Body)
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
errorString := errorStringBuilder.String()
|
||||
switch resp.StatusCode {
|
||||
case http.StatusConflict:
|
||||
return ErrBucketConflict(Error{bucket, errors.New(errorString)})
|
||||
}
|
||||
return newError(bucket, fmt.Errorf("service create for bucket %s, failed with status %s, error %s", bucket, resp.Status, errorString))
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user