Check if object lock is enabled on destination bucket while setting replication configuration on a object lock enabled bucket.
Showing the changes to cmd/api-errors.go (1 of 3 files). Show all
Unified · Split
| @@ -107,6 +107,7 @@ const ( · 106 unmodified lines | |||
| 107 | ErrNoSuchWebsiteConfiguration | 107 | ErrNoSuchWebsiteConfiguration |
| 108 | ErrReplicationConfigurationNotFoundError | 108 | ErrReplicationConfigurationNotFoundError |
| 109 | ErrReplicationDestinationNotFoundError | 109 | ErrReplicationDestinationNotFoundError |
| 110 | ErrReplicationDestinationMissingLock | ||
| 110 | ErrReplicationTargetNotFoundError | 111 | ErrReplicationTargetNotFoundError |
| 111 | ErrBucketRemoteIdenticalToSource | 112 | ErrBucketRemoteIdenticalToSource |
| 112 | ErrBucketRemoteAlreadyExists | 113 | ErrBucketRemoteAlreadyExists |
| @@ -830,6 +831,11 @@ var errorCodes = errorCodeMap{ · 717 unmodified lines | |||
| 830 | Description: "The replication destination bucket does not exist", | 831 | Description: "The replication destination bucket does not exist", |
| 831 | HTTPStatusCode: http.StatusNotFound, | 832 | HTTPStatusCode: http.StatusNotFound, |
| 832 | }, | 833 | }, |
| 834 | ErrReplicationDestinationMissingLock: { | ||
| 835 | Code: "ReplicationDestinationMissingLockError", | ||
| 836 | Description: "The replication destination bucket does not have object locking enabled", | ||
| 837 | HTTPStatusCode: http.StatusBadRequest, | ||
| 838 | }, | ||
| 833 | ErrReplicationTargetNotFoundError: { | 839 | ErrReplicationTargetNotFoundError: { |
| 834 | Code: "XminioAdminReplicationTargetNotFoundError", | 840 | Code: "XminioAdminReplicationTargetNotFoundError", |
| 835 | Description: "The replication target does not exist", | 841 | Description: "The replication target does not exist", |
| @@ -1909,6 +1915,8 @@ func toAPIErrorCode(ctx context.Context, err error) (apiErr APIErrorCode) { · 1073 unmodified lines | |||
| 1909 | apiErr = ErrReplicationConfigurationNotFoundError | 1915 | apiErr = ErrReplicationConfigurationNotFoundError |
| 1910 | case BucketReplicationDestinationNotFound: | 1916 | case BucketReplicationDestinationNotFound: |
| 1911 | apiErr = ErrReplicationDestinationNotFoundError | 1917 | apiErr = ErrReplicationDestinationNotFoundError |
| 1918 | case BucketReplicationDestinationMissingLock: | ||
| 1919 | apiErr = ErrReplicationDestinationMissingLock | ||
| 1912 | case BucketRemoteTargetNotFound: | 1920 | case BucketRemoteTargetNotFound: |
| 1913 | apiErr = ErrReplicationTargetNotFoundError | 1921 | apiErr = ErrReplicationTargetNotFoundError |
| 1914 | case BucketRemoteAlreadyExists: | 1922 | case BucketRemoteAlreadyExists: |