// 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:"The XML you provided was not well-formed or did not validate against our published schema.",
HTTPStatusCode:http.StatusBadRequest,
},
ErrInvalidPart:{
Code:"InvalidPart",
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.",
HTTPStatusCode:http.StatusBadRequest,
},
ErrInvalidPartOrder:{
Code:"InvalidPartOrder",
Description:"The list of parts was not in ascending order. The parts list must be specified in order by part number.",