From 58a144de5675737fab0ca1fff140f79604cccc04 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Mon, 20 Apr 2015 15:01:34 -0700 Subject: [PATCH] rgw: adjust return code if can't find upload Fixes: #11436 Return NoSuchUpload (instead of NoSuchKey). Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_op.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 1ab9049f0844a..ddd27b0497c31 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -2806,8 +2806,12 @@ static int get_multipart_info(RGWRados *store, struct req_state *s, string& meta obj.set_in_extra_data(true); int ret = get_obj_attrs(store, s, obj, attrs); - if (ret < 0) + if (ret < 0) { + if (ret == -ENOENT) { + return -ERR_NO_SUCH_UPLOAD; + } return ret; + } if (policy) { for (iter = attrs.begin(); iter != attrs.end(); ++iter) { -- 2.39.5