|
|
|
@ -109,6 +109,7 @@ const ( |
|
|
|
|
ErrReplicationDestinationNotFoundError |
|
|
|
|
ErrReplicationDestinationMissingLock |
|
|
|
|
ErrReplicationTargetNotFoundError |
|
|
|
|
ErrReplicationRemoteConnectionError |
|
|
|
|
ErrBucketRemoteIdenticalToSource |
|
|
|
|
ErrBucketRemoteAlreadyExists |
|
|
|
|
ErrBucketRemoteArnTypeInvalid |
|
|
|
@ -823,6 +824,11 @@ var errorCodes = errorCodeMap{ |
|
|
|
|
Description: "The replication target does not exist", |
|
|
|
|
HTTPStatusCode: http.StatusNotFound, |
|
|
|
|
}, |
|
|
|
|
ErrReplicationRemoteConnectionError: { |
|
|
|
|
Code: "XminioAdminReplicationRemoteConnectionError", |
|
|
|
|
Description: "Remote service endpoint or target bucket not available", |
|
|
|
|
HTTPStatusCode: http.StatusNotFound, |
|
|
|
|
}, |
|
|
|
|
ErrBucketRemoteIdenticalToSource: { |
|
|
|
|
Code: "XminioAdminRemoteIdenticalToSource", |
|
|
|
|
Description: "The remote target cannot be identical to source", |
|
|
|
@ -1906,6 +1912,8 @@ func toAPIErrorCode(ctx context.Context, err error) (apiErr APIErrorCode) { |
|
|
|
|
apiErr = ErrReplicationDestinationMissingLock |
|
|
|
|
case BucketRemoteTargetNotFound: |
|
|
|
|
apiErr = ErrReplicationTargetNotFoundError |
|
|
|
|
case BucketRemoteConnectionErr: |
|
|
|
|
apiErr = ErrReplicationRemoteConnectionError |
|
|
|
|
case BucketRemoteAlreadyExists: |
|
|
|
|
apiErr = ErrBucketRemoteAlreadyExists |
|
|
|
|
case BucketRemoteArnTypeInvalid: |
|
|
|
|