@ -106,16 +106,17 @@ const (
ErrNoSuchCORSConfiguration
ErrNoSuchWebsiteConfiguration
ErrReplicationConfigurationNotFoundError
ErrReplication DestinationNotFoundError
ErrRemote DestinationNotFoundError
ErrReplicationDestinationMissingLock
ErrReplication TargetNotFoundError
ErrRemote TargetNotFoundError
ErrReplicationRemoteConnectionError
ErrBucketRemoteIdenticalToSource
ErrBucketRemoteAlreadyExists
ErrBucketRemoteLabelInUse
ErrBucketRemoteArnTypeInvalid
ErrBucketRemoteArnInvalid
ErrBucketRemoteRemoveDisallowed
ErrReplication TargetNotVersionedError
ErrRemote TargetNotVersionedError
ErrReplicationSourceNotVersionedError
ErrReplicationNeedsVersioningError
ErrReplicationBucketNeedsVersioningError
@ -809,9 +810,9 @@ var errorCodes = errorCodeMap{
Description : "The replication configuration was not found" ,
HTTPStatusCode : http . StatusNotFound ,
} ,
ErrReplication DestinationNotFoundError : {
Code : "Replication DestinationNotFoundError" ,
Description : "The replication destination bucket does not exist" ,
ErrRemote DestinationNotFoundError : {
Code : "Remote DestinationNotFoundError" ,
Description : "The remote destination bucket does not exist" ,
HTTPStatusCode : http . StatusNotFound ,
} ,
ErrReplicationDestinationMissingLock : {
@ -819,9 +820,9 @@ var errorCodes = errorCodeMap{
Description : "The replication destination bucket does not have object locking enabled" ,
HTTPStatusCode : http . StatusBadRequest ,
} ,
ErrReplication TargetNotFoundError : {
Code : "XMinioAdminReplication TargetNotFoundError" ,
Description : "The replication target does not exist" ,
ErrRemote TargetNotFoundError : {
Code : "XMinioAdminRemote TargetNotFoundError" ,
Description : "The remote target does not exist" ,
HTTPStatusCode : http . StatusNotFound ,
} ,
ErrReplicationRemoteConnectionError : {
@ -839,9 +840,14 @@ var errorCodes = errorCodeMap{
Description : "The remote target already exists" ,
HTTPStatusCode : http . StatusBadRequest ,
} ,
ErrBucketRemoteLabelInUse : {
Code : "XMinioAdminBucketRemoteLabelInUse" ,
Description : "The remote target with this label already exists" ,
HTTPStatusCode : http . StatusBadRequest ,
} ,
ErrBucketRemoteRemoveDisallowed : {
Code : "XMinioAdminRemoteRemoveDisallowed" ,
Description : "Replication configuration exists with this ARN." ,
Description : "This ARN is in use by an existing configuration " ,
HTTPStatusCode : http . StatusBadRequest ,
} ,
ErrBucketRemoteArnTypeInvalid : {
@ -854,9 +860,9 @@ var errorCodes = errorCodeMap{
Description : "The bucket remote ARN does not have correct format" ,
HTTPStatusCode : http . StatusBadRequest ,
} ,
ErrReplication TargetNotVersionedError : {
Code : "Replication TargetNotVersionedError" ,
Description : "The replication target does not have versioning enabled" ,
ErrRemote TargetNotVersionedError : {
Code : "Remote TargetNotVersionedError" ,
Description : "The remote target does not have versioning enabled" ,
HTTPStatusCode : http . StatusBadRequest ,
} ,
ErrReplicationSourceNotVersionedError : {
@ -1906,24 +1912,26 @@ func toAPIErrorCode(ctx context.Context, err error) (apiErr APIErrorCode) {
apiErr = ErrAdminNoSuchQuotaConfiguration
case BucketReplicationConfigNotFound :
apiErr = ErrReplicationConfigurationNotFoundError
case BucketReplication DestinationNotFound :
apiErr = ErrReplication DestinationNotFoundError
case BucketRemote DestinationNotFound :
apiErr = ErrRemote DestinationNotFoundError
case BucketReplicationDestinationMissingLock :
apiErr = ErrReplicationDestinationMissingLock
case BucketRemoteTargetNotFound :
apiErr = ErrReplication TargetNotFoundError
apiErr = ErrRemote TargetNotFoundError
case BucketRemoteConnectionErr :
apiErr = ErrReplicationRemoteConnectionError
case BucketRemoteAlreadyExists :
apiErr = ErrBucketRemoteAlreadyExists
case BucketRemoteLabelInUse :
apiErr = ErrBucketRemoteLabelInUse
case BucketRemoteArnTypeInvalid :
apiErr = ErrBucketRemoteArnTypeInvalid
case BucketRemoteArnInvalid :
apiErr = ErrBucketRemoteArnInvalid
case BucketRemoteRemoveDisallowed :
apiErr = ErrBucketRemoteRemoveDisallowed
case BucketReplication TargetNotVersioned :
apiErr = ErrReplication TargetNotVersionedError
case BucketRemote TargetNotVersioned :
apiErr = ErrRemote TargetNotVersionedError
case BucketReplicationSourceNotVersioned :
apiErr = ErrReplicationSourceNotVersionedError
case BucketQuotaExceeded :