mirror of
https://github.com/minio/minio.git
synced 2026-02-04 18:00:15 -05:00
do not return an error in AbortMultipartUpload() (#18135)
returning an error is a bit undefined in AWS S3 as it may return an error or not depending on the time from AbortMultipartUpload().
This commit is contained in:
@@ -1075,8 +1075,13 @@ func (api objectAPIHandlers) AbortMultipartUploadHandler(w http.ResponseWriter,
|
||||
}
|
||||
opts := ObjectOptions{}
|
||||
if err := abortMultipartUpload(ctx, bucket, object, uploadID, opts); err != nil {
|
||||
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
|
||||
return
|
||||
switch err.(type) {
|
||||
case InvalidUploadID:
|
||||
// Do not have return an error for non-existent upload-id
|
||||
default:
|
||||
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
writeSuccessNoContent(w)
|
||||
|
||||
Reference in New Issue
Block a user