aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3api_errors.go
diff options
context:
space:
mode:
authorbinbinshi <javabinbin@126.com>2020-02-05 16:56:23 +0800
committerGitHub <noreply@github.com>2020-02-05 16:56:23 +0800
commitd892cad15d748327c2b7c649f6398ff35d8dce0b (patch)
tree29cb8adae01d9f4eaeabb02996d162700da2de1a /weed/s3api/s3api_errors.go
parentd4f755347e4874cf0a2fd13480580f348b86a465 (diff)
parent8d94564f4152cd890d5896a3dedf5e7589c5023e (diff)
downloadseaweedfs-d892cad15d748327c2b7c649f6398ff35d8dce0b.tar.xz
seaweedfs-d892cad15d748327c2b7c649f6398ff35d8dce0b.zip
Merge pull request #1 from chrislusf/master
update from chrisluf
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",