fix: Add support for preserving mtime for replication (#9995)

This PR is needed for bucket replication support
This commit is contained in:
Harshavardhana
2020-07-08 17:36:56 -07:00
committed by GitHub
parent 6136a963c8
commit 2743d4ca87
14 changed files with 358 additions and 266 deletions

View File

@@ -1909,6 +1909,12 @@ func toAPIError(ctx context.Context, err error) APIError {
// their internal error types. This code is only
// useful with gateway implementations.
switch e := err.(type) {
case InvalidArgument:
apiErr = APIError{
Code: "InvalidArgument",
Description: e.Error(),
HTTPStatusCode: errorCodes[ErrInvalidRequest].HTTPStatusCode,
}
case *xml.SyntaxError:
apiErr = APIError{
Code: "MalformedXML",