|
|
|
@ -108,7 +108,7 @@ const ( |
|
|
|
|
ErrReplicationConfigurationNotFoundError |
|
|
|
|
ErrReplicationDestinationNotFoundError |
|
|
|
|
ErrReplicationTargetNotFoundError |
|
|
|
|
|
|
|
|
|
ErrReplicationTargetNotVersionedError |
|
|
|
|
ErrReplicationNeedsVersioningError |
|
|
|
|
ErrReplicationBucketNeedsVersioningError |
|
|
|
|
ErrBucketReplicationDisabledError |
|
|
|
@ -830,6 +830,11 @@ var errorCodes = errorCodeMap{ |
|
|
|
|
Description: "The replication target does not exist", |
|
|
|
|
HTTPStatusCode: http.StatusNotFound, |
|
|
|
|
}, |
|
|
|
|
ErrReplicationTargetNotVersionedError: { |
|
|
|
|
Code: "ReplicationTargetNotVersionedError", |
|
|
|
|
Description: "The replication target does not have versioning enabled", |
|
|
|
|
HTTPStatusCode: http.StatusNotFound, |
|
|
|
|
}, |
|
|
|
|
ErrReplicationNeedsVersioningError: { |
|
|
|
|
Code: "InvalidRequest", |
|
|
|
|
Description: "Versioning must be 'Enabled' on the bucket to apply a replication configuration", |
|
|
|
@ -1876,6 +1881,8 @@ func toAPIErrorCode(ctx context.Context, err error) (apiErr APIErrorCode) { |
|
|
|
|
apiErr = ErrReplicationDestinationNotFoundError |
|
|
|
|
case BucketReplicationTargetNotFound: |
|
|
|
|
apiErr = ErrReplicationTargetNotFoundError |
|
|
|
|
case BucketReplicationTargetNotVersioned: |
|
|
|
|
apiErr = ErrReplicationTargetNotVersionedError |
|
|
|
|
case BucketQuotaExceeded: |
|
|
|
|
apiErr = ErrAdminBucketQuotaExceeded |
|
|
|
|
case *event.ErrInvalidEventName: |
|
|
|
|