|
|
@ -107,6 +107,7 @@ const ( |
|
|
|
ErrNoSuchWebsiteConfiguration |
|
|
|
ErrNoSuchWebsiteConfiguration |
|
|
|
ErrReplicationConfigurationNotFoundError |
|
|
|
ErrReplicationConfigurationNotFoundError |
|
|
|
ErrReplicationDestinationNotFoundError |
|
|
|
ErrReplicationDestinationNotFoundError |
|
|
|
|
|
|
|
ErrReplicationDestinationMissingLock |
|
|
|
ErrReplicationTargetNotFoundError |
|
|
|
ErrReplicationTargetNotFoundError |
|
|
|
ErrBucketRemoteIdenticalToSource |
|
|
|
ErrBucketRemoteIdenticalToSource |
|
|
|
ErrBucketRemoteAlreadyExists |
|
|
|
ErrBucketRemoteAlreadyExists |
|
|
@ -830,6 +831,11 @@ var errorCodes = errorCodeMap{ |
|
|
|
Description: "The replication destination bucket does not exist", |
|
|
|
Description: "The replication destination bucket does not exist", |
|
|
|
HTTPStatusCode: http.StatusNotFound, |
|
|
|
HTTPStatusCode: http.StatusNotFound, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
ErrReplicationDestinationMissingLock: { |
|
|
|
|
|
|
|
Code: "ReplicationDestinationMissingLockError", |
|
|
|
|
|
|
|
Description: "The replication destination bucket does not have object locking enabled", |
|
|
|
|
|
|
|
HTTPStatusCode: http.StatusBadRequest, |
|
|
|
|
|
|
|
}, |
|
|
|
ErrReplicationTargetNotFoundError: { |
|
|
|
ErrReplicationTargetNotFoundError: { |
|
|
|
Code: "XminioAdminReplicationTargetNotFoundError", |
|
|
|
Code: "XminioAdminReplicationTargetNotFoundError", |
|
|
|
Description: "The replication target does not exist", |
|
|
|
Description: "The replication target does not exist", |
|
|
@ -1909,6 +1915,8 @@ func toAPIErrorCode(ctx context.Context, err error) (apiErr APIErrorCode) { |
|
|
|
apiErr = ErrReplicationConfigurationNotFoundError |
|
|
|
apiErr = ErrReplicationConfigurationNotFoundError |
|
|
|
case BucketReplicationDestinationNotFound: |
|
|
|
case BucketReplicationDestinationNotFound: |
|
|
|
apiErr = ErrReplicationDestinationNotFoundError |
|
|
|
apiErr = ErrReplicationDestinationNotFoundError |
|
|
|
|
|
|
|
case BucketReplicationDestinationMissingLock: |
|
|
|
|
|
|
|
apiErr = ErrReplicationDestinationMissingLock |
|
|
|
case BucketRemoteTargetNotFound: |
|
|
|
case BucketRemoteTargetNotFound: |
|
|
|
apiErr = ErrReplicationTargetNotFoundError |
|
|
|
apiErr = ErrReplicationTargetNotFoundError |
|
|
|
case BucketRemoteAlreadyExists: |
|
|
|
case BucketRemoteAlreadyExists: |
|
|
|