diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-07-22 01:14:36 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-07-22 01:14:36 -0700 |
| commit | 6319d84f42fba2a1c1617c4d2603adac4ea57301 (patch) | |
| tree | e90403bf8cc9a2946bf2ecec94d411efb00bed6a /weed/s3api/s3api_errors.go | |
| parent | 922c614bdea87028d0e5a690b3e3b7f2d4675f11 (diff) | |
| download | seaweedfs-6319d84f42fba2a1c1617c4d2603adac4ea57301.tar.xz seaweedfs-6319d84f42fba2a1c1617c4d2603adac4ea57301.zip | |
s3 API add ListObjectsV1
Diffstat (limited to 'weed/s3api/s3api_errors.go')
| -rw-r--r-- | weed/s3api/s3api_errors.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/weed/s3api/s3api_errors.go b/weed/s3api/s3api_errors.go index 771b1dd82..2a86595fb 100644 --- a/weed/s3api/s3api_errors.go +++ b/weed/s3api/s3api_errors.go @@ -26,7 +26,7 @@ type ErrorCode int // Error codes, see full list at http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html const ( - ErrNone ErrorCode = iota + ErrNone ErrorCode = iota ErrMethodNotAllowed ErrBucketNotEmpty ErrBucketAlreadyExists @@ -34,7 +34,9 @@ const ( ErrNoSuchBucket ErrInvalidBucketName ErrInvalidDigest + ErrInvalidMaxKeys ErrInternalError + ErrNotImplemented ) // error code to APIError structure, these fields carry respective @@ -70,6 +72,11 @@ var errorCodeResponse = map[ErrorCode]APIError{ Description: "The Content-Md5 you specified is not valid.", HTTPStatusCode: http.StatusBadRequest, }, + ErrInvalidMaxKeys: { + Code: "InvalidArgument", + Description: "Argument maxKeys must be an integer between 0 and 2147483647", + HTTPStatusCode: http.StatusBadRequest, + }, ErrNoSuchBucket: { Code: "NoSuchBucket", Description: "The specified bucket does not exist", @@ -80,6 +87,11 @@ var errorCodeResponse = map[ErrorCode]APIError{ Description: "We encountered an internal error, please try again.", HTTPStatusCode: http.StatusInternalServerError, }, + ErrNotImplemented: { + Code: "NotImplemented", + Description: "A header you provided implies functionality that is not implemented", + HTTPStatusCode: http.StatusNotImplemented, + }, } // getAPIError provides API Error for input API error code. |
