1
0
mirror of https://github.com/minio/mc.git synced 2025-11-14 23:42:27 +03:00

Print proper errors message received on the wire from any Object Storage

This commit is contained in:
Harshavardhana
2015-04-17 20:54:24 -07:00
parent 29cdb51e06
commit 1f9136ffc5
3 changed files with 27 additions and 8 deletions

View File

@@ -90,12 +90,27 @@ type errAliasNotFound struct {
}
func (e errAliasNotFound) Error() string {
return fmt.Sprintf("alias: %s exists", e.name)
return "alias: " + e.name + " exists"
}
// errInvalidAuthKeys - invalid authorization keys
type errInvalidAuthKeys struct{}
func (e errInvalidAuthKeys) Error() string {
return fmt.Sprintf("invalid authorization keys")
return "invalid authorization keys"
}
// errInvalidBucketName - invalid bucket name
type errInvalidBucketName struct {
bucket string
}
func (e errInvalidBucketName) Error() string {
return "invalid bucket name: " + e.bucket
}
type errBucketNameEmpty struct{}
func (e errBucketNameEmpty) Error() string {
return "bucket name empty"
}