add ownership rest apis (#3765)

This commit is contained in:
LHHDZ
2022-10-02 10:18:00 +08:00
committed by GitHub
parent 6fa3d0cc46
commit e9584d9661
9 changed files with 357 additions and 2 deletions

View File

@@ -107,6 +107,8 @@ const (
ErrTooManyRequest
ErrRequestBytesExceed
OwnershipControlsNotFoundError
)
// error code to APIError structure, these fields carry respective
@@ -414,6 +416,12 @@ var errorCodeResponse = map[ErrorCode]APIError{
Description: "Simultaneous request bytes exceed limitations",
HTTPStatusCode: http.StatusTooManyRequests,
},
OwnershipControlsNotFoundError: {
Code: "OwnershipControlsNotFoundError",
Description: "The bucket ownership controls were not found",
HTTPStatusCode: http.StatusNotFound,
},
}
// GetAPIError provides API Error for input API error code.