aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3api_errors.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-01-31 00:11:08 -0800
committerChris Lu <chris.lu@gmail.com>2020-01-31 00:11:12 -0800
commita80ecbfe84486487c868c90fc28d14ab337524d3 (patch)
treefd404c9e71afe80f5d5b05773e81b2219e9885ff /weed/s3api/s3api_errors.go
parent3b043ead49574ec7b9972a7d689186de17dda70f (diff)
downloadseaweedfs-a80ecbfe84486487c868c90fc28d14ab337524d3.tar.xz
seaweedfs-a80ecbfe84486487c868c90fc28d14ab337524d3.zip
s3: add s3 copy
fix https://github.com/chrislusf/seaweedfs/issues/1190
Diffstat (limited to 'weed/s3api/s3api_errors.go')
-rw-r--r--weed/s3api/s3api_errors.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/weed/s3api/s3api_errors.go b/weed/s3api/s3api_errors.go
index 7ba55ed28..96f8d9fd6 100644
--- a/weed/s3api/s3api_errors.go
+++ b/weed/s3api/s3api_errors.go
@@ -41,6 +41,8 @@ const (
ErrInvalidPartNumberMarker
ErrInvalidPart
ErrInternalError
+ ErrInvalidCopyDest
+ ErrInvalidCopySource
ErrNotImplemented
)
@@ -118,6 +120,18 @@ var errorCodeResponse = map[ErrorCode]APIError{
Description: "One or more of the specified parts could not be found. The part may not have been uploaded, or the specified entity tag may not match the part's entity tag.",
HTTPStatusCode: http.StatusBadRequest,
},
+
+ ErrInvalidCopyDest: {
+ Code: "InvalidRequest",
+ Description: "This copy request is illegal because it is trying to copy an object to itself without changing the object's metadata, storage class, website redirect location or encryption attributes.",
+ HTTPStatusCode: http.StatusBadRequest,
+ },
+ ErrInvalidCopySource: {
+ Code: "InvalidArgument",
+ Description: "Copy Source must mention the source bucket and key: sourcebucket/sourcekey.",
+ HTTPStatusCode: http.StatusBadRequest,
+ },
+
ErrNotImplemented: {
Code: "NotImplemented",
Description: "A header you provided implies functionality that is not implemented",