handle dns.ErrBucketConflict as BucketAlreadyExists (#12013)

This commit is contained in:
Harshavardhana
2021-04-08 08:24:55 -07:00
committed by GitHub
parent 2899cc92b4
commit 835d2cb9a3
3 changed files with 15 additions and 1 deletions
+9 -1
View File
@@ -26,12 +26,20 @@ type Error struct {
type ErrInvalidBucketName Error
func (e ErrInvalidBucketName) Error() string {
return "invalid bucket name error: " + e.Err.Error()
return e.Bucket + " invalid bucket name error: " + e.Err.Error()
}
func (e Error) Error() string {
return "dns related error: " + e.Err.Error()
}
// ErrBucketConflict for buckets that already exist
type ErrBucketConflict Error
func (e ErrBucketConflict) Error() string {
return e.Bucket + " bucket conflict error: " + e.Err.Error()
}
// Store dns record store
type Store interface {
Put(bucket string) error