Remove NotSupported error redundant with NotImplemented (#5074)

master
Harshavardhana 7 years ago committed by Nitish Tiwari
parent b2cbade477
commit 53e133e844
  1. 3
      cmd/api-errors.go
  2. 4
      cmd/api-errors_test.go
  3. 5
      cmd/gateway-gcs.go
  4. 7
      cmd/object-api-errors.go

@ -114,7 +114,6 @@ const (
ErrInvalidQueryParams ErrInvalidQueryParams
ErrBucketAlreadyOwnedByYou ErrBucketAlreadyOwnedByYou
ErrInvalidDuration ErrInvalidDuration
ErrNotSupported
ErrBucketAlreadyExists ErrBucketAlreadyExists
ErrMetadataTooLarge ErrMetadataTooLarge
ErrUnsupportedMetadata ErrUnsupportedMetadata
@ -748,8 +747,6 @@ func toAPIErrorCode(err error) (apiErr APIErrorCode) {
apiErr = ErrEntityTooLarge apiErr = ErrEntityTooLarge
case ObjectTooSmall: case ObjectTooSmall:
apiErr = ErrEntityTooSmall apiErr = ErrEntityTooSmall
case NotSupported:
apiErr = ErrNotSupported
case NotImplemented: case NotImplemented:
apiErr = ErrNotImplemented apiErr = ErrNotImplemented
case PolicyNotFound: case PolicyNotFound:

@ -103,10 +103,6 @@ func TestAPIErrCode(t *testing.T) {
StorageFull{}, StorageFull{},
ErrStorageFull, ErrStorageFull,
}, },
{
NotSupported{},
ErrNotSupported,
},
{ {
NotImplemented{}, NotImplemented{},
ErrNotImplemented, ErrNotImplemented,

@ -825,11 +825,6 @@ func (l *gcsGateway) ListMultipartUploads(bucket string, prefix string, keyMarke
}, nil }, nil
} }
// CopyObjectPart - copy part of object to other bucket and object
func (l *gcsGateway) CopyObjectPart(srcBucket string, srcObject string, destBucket string, destObject string, uploadID string, partID int, startOffset int64, length int64) (info PartInfo, err error) {
return PartInfo{}, traceError(NotSupported{})
}
// Checks if minio.sys.tmp/multipart/v1/<upload-id>/gcs.json exists, returns // Checks if minio.sys.tmp/multipart/v1/<upload-id>/gcs.json exists, returns
// an object layer compatible error upon any error. // an object layer compatible error upon any error.
func (l *gcsGateway) checkUploadIDExists(bucket string, key string, uploadID string) error { func (l *gcsGateway) checkUploadIDExists(bucket string, key string, uploadID string) error {

@ -366,13 +366,6 @@ func (e NotImplemented) Error() string {
return "Not Implemented" return "Not Implemented"
} }
// NotSupported If a feature is not supported
type NotSupported struct{}
func (e NotSupported) Error() string {
return "Not Supported"
}
// PolicyNesting - policy nesting conflict. // PolicyNesting - policy nesting conflict.
type PolicyNesting struct{} type PolicyNesting struct{}

Loading…
Cancel
Save