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
ErrBucketAlreadyOwnedByYou
ErrInvalidDuration
ErrNotSupported
ErrBucketAlreadyExists
ErrMetadataTooLarge
ErrUnsupportedMetadata
@ -748,8 +747,6 @@ func toAPIErrorCode(err error) (apiErr APIErrorCode) {
apiErr = ErrEntityTooLarge
case ObjectTooSmall:
apiErr = ErrEntityTooSmall
case NotSupported:
apiErr = ErrNotSupported
case NotImplemented:
apiErr = ErrNotImplemented
case PolicyNotFound:

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

@ -825,11 +825,6 @@ func (l *gcsGateway) ListMultipartUploads(bucket string, prefix string, keyMarke
}, 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
// an object layer compatible error upon any error.
func (l *gcsGateway) checkUploadIDExists(bucket string, key string, uploadID string) error {

@ -366,13 +366,6 @@ func (e NotImplemented) Error() string {
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.
type PolicyNesting struct{}

Loading…
Cancel
Save