mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 12:10:24 +03:00
Implement proper errors for Multipart
This commit is contained in:
+7
-1
@@ -64,11 +64,12 @@ const (
|
||||
TooManyBuckets
|
||||
MethodNotAllowed
|
||||
InvalidPart
|
||||
InvalidPartOrder
|
||||
)
|
||||
|
||||
// Error codes, non exhaustive list - standard HTTP errors
|
||||
const (
|
||||
NotAcceptable = iota + 24
|
||||
NotAcceptable = iota + 25
|
||||
)
|
||||
|
||||
// Error code to Error structure map
|
||||
@@ -193,6 +194,11 @@ var errorCodeResponse = map[int]Error{
|
||||
Description: "One or more of the specified parts could not be found",
|
||||
HTTPStatusCode: http.StatusBadRequest,
|
||||
},
|
||||
InvalidPartOrder: {
|
||||
Code: "InvalidPartOrder",
|
||||
Description: "The list of parts was not in ascending order. The parts list must be specified in order by part number.",
|
||||
HTTPStatusCode: http.StatusBadRequest,
|
||||
},
|
||||
}
|
||||
|
||||
// errorCodeError provides errorCode to Error. It returns empty if the code provided is unknown
|
||||
|
||||
Reference in New Issue
Block a user