diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2022-06-19 22:56:40 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-19 22:56:40 -0700 |
| commit | 6270047202aa41492261576800fe44e86ab92536 (patch) | |
| tree | e84927ea360a7ede80d13fe7aada59356c0475ce /weed/s3api/s3err/s3api_errors.go | |
| parent | 1baa7ead59a0a040d1165e3579cf79f90c20dd65 (diff) | |
| parent | 8db9f13bc69be974fbd18c4b0aacd071ea1acaa9 (diff) | |
| download | seaweedfs-6270047202aa41492261576800fe44e86ab92536.tar.xz seaweedfs-6270047202aa41492261576800fe44e86ab92536.zip | |
Merge pull request #3189 from shichanglin5/circuit_breaker
add s3 circuit breaker support for 'simultaneous request count' and '…
Diffstat (limited to 'weed/s3api/s3err/s3api_errors.go')
| -rw-r--r-- | weed/s3api/s3err/s3api_errors.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/weed/s3api/s3err/s3api_errors.go b/weed/s3api/s3err/s3api_errors.go index 2e93f49cb..57f269a2e 100644 --- a/weed/s3api/s3err/s3api_errors.go +++ b/weed/s3api/s3err/s3api_errors.go @@ -104,6 +104,9 @@ const ( ErrExistingObjectIsDirectory ErrExistingObjectIsFile + + ErrTooManyRequest + ErrRequestBytesExceed ) // error code to APIError structure, these fields carry respective @@ -401,6 +404,16 @@ var errorCodeResponse = map[ErrorCode]APIError{ Description: "Existing Object is a file.", HTTPStatusCode: http.StatusConflict, }, + ErrTooManyRequest: { + Code: "ErrTooManyRequest", + Description: "Too many simultaneous request count", + HTTPStatusCode: http.StatusTooManyRequests, + }, + ErrRequestBytesExceed: { + Code: "ErrRequestBytesExceed", + Description: "Simultaneous request bytes exceed limitations", + HTTPStatusCode: http.StatusTooManyRequests, + }, } // GetAPIError provides API Error for input API error code. |
