// error code to APIError structure, these fields carry respective
// descriptions for all the error responses.
varerrorCodeResponse=map[ErrorCode]APIError{
ErrMethodNotAllowed:{
Code:"MethodNotAllowed",
Description:"The specified method is not allowed against this resource.",
HTTPStatusCode:http.StatusMethodNotAllowed,
},
ErrBucketNotEmpty:{
Code:"BucketNotEmpty",
Description:"The bucket you tried to delete is not empty",
HTTPStatusCode:http.StatusConflict,
},
ErrBucketAlreadyExists:{
Code:"BucketAlreadyExists",
Description:"The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again.",
HTTPStatusCode:http.StatusConflict,
},
ErrBucketAlreadyOwnedByYou:{
Code:"BucketAlreadyOwnedByYou",
Description:"Your previous request to create the named bucket succeeded and you already own it.",
Description:"One or more of the specified parts could not be found. The part may not have been uploaded, or the specified entity tag may not match the part's entity tag.",
Description:"This copy request is illegal because it is trying to copy an object to itself without changing the object's metadata, storage class, website redirect location or encryption attributes.",
HTTPStatusCode:http.StatusBadRequest,
},
ErrInvalidCopySource:{
Code:"InvalidArgument",
Description:"Copy Source must mention the source bucket and key: sourcebucket/sourcekey.",