diff options
| author | hilimd <68371223+hilimd@users.noreply.github.com> | 2021-05-27 15:48:38 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-27 15:48:38 +0800 |
| commit | ff26e646481a832ff6b75b5efa084935ed1a739b (patch) | |
| tree | e39c62671768cd64e34549aeb6767acc0f965604 /weed/s3api/s3err/s3api_errors.go | |
| parent | 9524b08becce1e21d5da08884333de3b011f8e4a (diff) | |
| parent | 45bffc92a8e1cf42fdacb20824223e0e4df710f0 (diff) | |
| download | seaweedfs-ff26e646481a832ff6b75b5efa084935ed1a739b.tar.xz seaweedfs-ff26e646481a832ff6b75b5efa084935ed1a739b.zip | |
Merge pull request #78 from chrislusf/master
sync
Diffstat (limited to 'weed/s3api/s3err/s3api_errors.go')
| -rw-r--r-- | weed/s3api/s3err/s3api_errors.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/weed/s3api/s3err/s3api_errors.go b/weed/s3api/s3err/s3api_errors.go index 877c39a52..7f0ffdf86 100644 --- a/weed/s3api/s3err/s3api_errors.go +++ b/weed/s3api/s3err/s3api_errors.go @@ -91,7 +91,9 @@ const ( ErrRequestNotReadyYet ErrMissingDateHeader ErrInvalidRequest + ErrAuthNotSetup ErrNotImplemented + ErrPreconditionFailed ErrExistingObjectIsDirectory ) @@ -341,11 +343,21 @@ var errorCodeResponse = map[ErrorCode]APIError{ Description: "Invalid Request", HTTPStatusCode: http.StatusBadRequest, }, + ErrAuthNotSetup: { + Code: "InvalidRequest", + Description: "Signed request requires setting up SeaweedFS S3 authentication", + HTTPStatusCode: http.StatusBadRequest, + }, ErrNotImplemented: { Code: "NotImplemented", Description: "A header you provided implies functionality that is not implemented", HTTPStatusCode: http.StatusNotImplemented, }, + ErrPreconditionFailed: { + Code: "PreconditionFailed", + Description: "At least one of the pre-conditions you specified did not hold", + HTTPStatusCode: http.StatusPreconditionFailed, + }, ErrExistingObjectIsDirectory: { Code: "ExistingObjectIsDirectory", Description: "Existing Object is a directory.", |
