|
|
@ -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.
|
|
|
|