mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-20 20:49:22 +08:00
add s3api error for copy in file, not directory
This commit is contained in:
@@ -101,6 +101,7 @@ const (
|
||||
ErrPreconditionFailed
|
||||
|
||||
ErrExistingObjectIsDirectory
|
||||
ErrExistingObjectIsFile
|
||||
)
|
||||
|
||||
// error code to APIError structure, these fields carry respective
|
||||
@@ -383,6 +384,11 @@ var errorCodeResponse = map[ErrorCode]APIError{
|
||||
Description: "Existing Object is a directory.",
|
||||
HTTPStatusCode: http.StatusConflict,
|
||||
},
|
||||
ErrExistingObjectIsFile: {
|
||||
Code: "ExistingObjectIsFile",
|
||||
Description: "Existing Object is a file.",
|
||||
HTTPStatusCode: http.StatusConflict,
|
||||
},
|
||||
}
|
||||
|
||||
// GetAPIError provides API Error for input API error code.
|
||||
|
Reference in New Issue
Block a user