mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-20 02:31:51 +08:00
s3: report error to s3 when updating an object but it is already a directory
fix https://github.com/chrislusf/seaweedfs/issues/1545
This commit is contained in:
@@ -92,6 +92,8 @@ const (
|
||||
ErrMissingDateHeader
|
||||
ErrInvalidRequest
|
||||
ErrNotImplemented
|
||||
|
||||
ErrExistingObjectIsDirectory
|
||||
)
|
||||
|
||||
// error code to APIError structure, these fields carry respective
|
||||
@@ -344,6 +346,11 @@ var errorCodeResponse = map[ErrorCode]APIError{
|
||||
Description: "A header you provided implies functionality that is not implemented",
|
||||
HTTPStatusCode: http.StatusNotImplemented,
|
||||
},
|
||||
ErrExistingObjectIsDirectory: {
|
||||
Code: "ExistingObjectIsDirectory",
|
||||
Description: "Existing Object is a directory.",
|
||||
HTTPStatusCode: http.StatusConflict,
|
||||
},
|
||||
}
|
||||
|
||||
// GetAPIError provides API Error for input API error code.
|
||||
|
Reference in New Issue
Block a user